Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fastapi traces not captured for sub applications #11183

Open
graham-atom opened this issue Oct 25, 2024 · 0 comments
Open

Fastapi traces not captured for sub applications #11183

graham-atom opened this issue Oct 25, 2024 · 0 comments
Labels

Comments

@graham-atom
Copy link

We recently upgraded to version 2.14.4 for our fastapi application (fastapi = "0.111.0"). We were using the asgi integration with trace middleware https://ddtrace.readthedocs.io/en/stable/integrations.html#asgi but it seems to be deprecated in newer versions (even though the docs say nothing of this).

we mount a sub application like so:

from fastapi import Depends, FastAPI
app = FastAPI(
    title="API",
    version="1.0,0,
    docs_url=None,
    redoc_url=None,
    openapi_url=None,
    lifespan=lifespan,
)

from application.partner import partner_api

# "Mount" the Partner Endpoint API as a subapp at a subpath
SUB_APP_PREFIX = "/partner"
app.mount(SUB_APP_PREFIX, partner_api)

we run the application using ddtrace-run and the top level application traces appear, but none of the sub application

@github-actions github-actions bot added the stale label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant