-
-
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
feat(browser): Create spans as children of root span by default #10986
Conversation
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I get why we need to do something about the current behaviour but at the same time it's ...sad that this is the consequence 😅
IMO, even in the browser, the parent<>child hierarchy makes sense for example for a span happening within a client-side data loading function. In this case we can't even set the flag because the span is created within our fetch instrumentation where we probably don't always want to set the flag. Also, setting the flag increases the bundle size footprint.
But 🤷 there is no ideal solution here 😬
Unfortunately, I agree, I also don't have a better solution for this.
We do nothing
Do we have concrete reports that the current behaviour is bothering people? Or some kind of indication how often we currently get the parent<>child mapping wrong? Maybe doing nothing is a feasible alternative?
So just to clarify, this setting is on I think we don't have that many reports of this because pre- Now, as we basically promote With this change, in browser, you'll always have a hierarchy like this for the example you gave:
does this make sense? so the http requests would always be siblings of the data loading function span... |
@@ -73,7 +73,7 @@ describe('Sentry.trackComponent()', () => { | |||
description: '<Dummy$>', | |||
op: 'ui.svelte.update', | |||
origin: 'auto.ui.svelte', | |||
parent_span_id: initSpanId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test (and src change) shows the actual change in semantics!
9c599bd
to
7798c67
Compare
Bundle ReportChanges will decrease total bundle size by 618.37kB ⬇️
|
You can opt out of this by setting `parentSpanIsAlwaysRootSpan=false` in your client options. update nested span handling in svelte
7798c67
to
4592d98
Compare
For showing current behavior with using differently timed async spans in browser ref getsentry#10986 ref getsentry#10944
…entry#10986) You can opt out of this by setting `parentSpanIsAlwaysRootSpan=false` in your client options. This means that in browser, any span will always be added to the active root span, not the active span. This way, we should be able to avoid problems with execution contexts etc. Closes getsentry#10944
You can opt out of this by setting
parentSpanIsAlwaysRootSpan=false
in your client options.This means that in browser, any span will always be added to the active root span, not the active span. This way, we should be able to avoid problems with execution contexts etc.
Closes #10944