-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Ensure browser traceId lifetime works as expected #11599
Labels
Comments
Lms24
added
Package: browser
Issues related to the Sentry Browser SDK
Type: Tests
labels
Apr 15, 2024
Lms24
changed the title
Ensure browser traceId lifetime is set as expected
Ensure browser traceId lifetime works as expected
Apr 15, 2024
This was referenced Apr 15, 2024
This was referenced Apr 16, 2024
Lms24
added a commit
that referenced
this issue
Apr 17, 2024
… consistent (#11631) As spec'd out in #11599 and agreed upon in internal discussions, a trace should to stay consistent over the entire time span of one route. Therefore, when the initial pageload or navigation span ends, we update the scope's propagation context to keep span-specific attributes like the `sampled` decision and the dynamic sampling context on the scope's propagation context, even after the transaction has ended. This ensures that the trace data is consistent for the entire duration of the route. Subsequent navigations will reset the propagation context (see #11377).
Lms24
added a commit
that referenced
this issue
Apr 17, 2024
…ario (#11636) Adds a couple of tests to cover the "Tracing Without Performance" use case where no spans will be created but we nevertheless attach tracing headers to outgoing requests and attach a trace id to errors. Also, we expect these traceIds to be different/new for each subsequent navigation ref #11599
Lms24
added a commit
that referenced
this issue
Apr 17, 2024
…ario (#11636) Adds a couple of tests to cover the "Tracing Without Performance" use case where no spans will be created but we nevertheless attach tracing headers to outgoing requests and attach a trace id to errors. Also, we expect these traceIds to be different/new for each subsequent navigation ref #11599
This was referenced Apr 17, 2024
Lms24
added a commit
that referenced
this issue
Apr 18, 2024
…11679) Wwe can streamline our pageload span creation logic now that we actually want to keep the propagation context on the scope after the transaction finished (see #11599). Previously, we'd fork a new scope for the pageload span but IMHO (and according to all our tests) this is no longer necessary.
Completed |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Problem Statement
In v7, traces in browser SDKs had a bit of a weird lifetime and behavior:
With v8, we're changing the validity and lifetime of a single trace: It'll remain consistent and valid per route. This means:
Solution Brainstorm
We already did most of the work in #11377 but identified a lack of tests to cover scenarios. This issue tracks all scenarios we should test as well as potential issues we identify and fix along the way.
Scenarios
<meta>
tag pageload transactions #11622trace
envelope headers in trace lifetime tests #11660Fixes
propagationContext
onspanEnd
to keep trace consistent #11631The text was updated successfully, but these errors were encountered: