Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

No supported for fastAPI, need to add middleware for fastapi #427

Open
ravibhushan29 opened this issue Apr 22, 2024 · 2 comments
Open

No supported for fastAPI, need to add middleware for fastapi #427

ravibhushan29 opened this issue Apr 22, 2024 · 2 comments

Comments

@ravibhushan29
Copy link

Integration Gap: AWS X-Ray SDK for Python lacks native support for FastAPI, requiring the addition of middleware for seamless integration

@jj22ee
Copy link
Contributor

jj22ee commented May 6, 2024

Hi, while the X-Ray Python SDK currently does not support FastAPI, you can checkout OpenTelemetry SDKs which do have FastAPI support.

https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-fastapi

Note that if you want to send trace data to X-Ray using OTel SDKs, you need to use ADOT Collector or Cloudwatch Agent instead of the X-Ray Daemon.

@Erry91
Copy link

Erry91 commented Nov 29, 2024

Is there any example out there of a middleware for FastApi that uses the AWS Xray SDK? Even if it's not natively supported it would be nice to know how to approach it with a custom middleware.
@ravibhushan29 do you happen to have a small snippet to get me started with the custom middleware?

Thank you in advance

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants