sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

FastAPI spans have wrong parent span?

Open antonpirker opened this issue 3 years ago • 0 comments

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.9.10

Steps to Reproduce

I have a FastAPI demo app: https://github.com/getsentry/demo-app-django-react/tree/main/backend/fastapi The app has a middleware called CounterMiddleware that increments a counter in Redis.

It seems that the spans has the wrong parent. See:

Screenshot 2022-10-04 at 18 09 44

Expected Result

The redis span should be under the CounterMiddleware and not under the AsyncExitStackMiddleware.

Actual Result

The redis span is drawn under the wrong parent span. (checking the parent span id shows that it has the wrong parent span id)

antonpirker avatar Oct 04 '22 16:10 antonpirker