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

Spans for FastAPI background tasks are not shown as async #3439

Open
antonpirker opened this issue Aug 12, 2024 · 0 comments
Open

Spans for FastAPI background tasks are not shown as async #3439

antonpirker opened this issue Aug 12, 2024 · 0 comments
Labels

Comments

@antonpirker
Copy link
Member

antonpirker commented Aug 12, 2024

How do you use Sentry?

Sentry Saas (sentry.io)

Version

all

Steps to Reproduce

Use this example FastAPI app:
https://github.com/antonpirker/testing-sentry/tree/main/test-fastapi-background-tasks

It calls a number of FastAPI background tasks when you point your browser to http://localhost:5000

This was reported by a user. See:
https://sentry.sentry.io/feedback/?referrer=slack&notification_uuid=83102b8eed5a-4b4[…]ype=issue&feedbackSlug=javascript%3A5697577869&project=11276

Expected Result

The spans that are created for the background tasks should be in parallel, because those background tasks are called asynchronously by FastAPI.
NOTE: this needs to be checked in the FastAPI source code if it is actually calling those background tasks in parallel! (maybe this is the correct result...)

Actual Result

The spans are shown as being executed in serial:

Image

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