Skip to content

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

Description

@ravibhushan29

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

Activity

  1. jj22ee commented on May 6, 2024

    @jj22ee
    Member

    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.

  2. Erry91 commented on Nov 29, 2024

    @Erry91

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions