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

Parent/child relationship in spans from ASGI based streaming response wrong.

Open antonpirker opened this issue 1 year ago • 0 comments

How do you use Sentry?

Sentry Saas (sentry.io)

Version

all

Steps to Reproduce

Run this demo application: https://github.com/antonpirker/testing-sentry/blob/main/test-fastapi-streaming-response/main.py

Expected Result

The spans created in the response generator called SPAN Stream Response Generator should be childrend of the span SPAN Streaming View.

Actual Result

The spans SPAN Stream Response Generator are children of the root and siblings to SPAN Streaming View: Image

Solution brain storming

This is probably related to: https://github.com/getsentry/sentry-python/pull/3798 And should also be treated the same way (with having a maximum transaction duration of 5 minutes)

antonpirker avatar Nov 25 '24 09:11 antonpirker