You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No supported for fastAPI, need to add middleware for fastapi #427
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?
Activity
jj22ee commentedon 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 commentedon 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