-
-
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
test(browser): Add test for current DSC transaction name updating behavior #13953
Conversation
7. Update span name again with HQ name (source: route) | ||
8. Make request and check that baggage has updated HQ txn name | ||
9. Capture error and check that envelope trace header has updated HQ txn name | ||
10. End span and check that envelope trace header has updated HQ txn name |
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.
can we add 11. to send a request after the span has ended, and make sure what is sent then? as we keep the trace alive after that (but not on the active span anymore, but the propagation context) this is also a scenario, right?
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.
yup, good point. Let me add that
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 so it looks like at the moment, the DSC is also re-generated and no span information is added at all, meaning we not only loose transaction
name but also sample_rate
and sampled
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.
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.
let's reflect this in this PR I'd say and then see if we can fix/improve this in a follow up...?
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.
@mydea I think the behavior in this test is caused by the constructed scenario of us starting the trace by creating a custom span as opposed to a pageload or navigation span. I will look into what exactly is causing the transaction info to be missing while the traceId remains the same in this scenario. However, I added tests for the usual pageload transaction scenario where after the transaction ends we make requests/send additional spans. They have consistent DSC data from the initial pageload transaction.
==> we should have consistent behaviour today as long as browserTracingIntegration is used with default options for pageload/navigation.
❌ 6 Tests Failed:
View the top 3 failed tests by shortest run time
To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard |
06c31d9
to
079417d
Compare
…avior (#13953) Add a browser integration test that describes the current behaviour of how we update the `transaction` field in the DSC which is propagated via the `baggage` header and added to envelopes as the `trace` header.
This PR adds a browser integration test that describes the current behaviour of how we update the
transaction
field in the DSC which is propagated via thebaggage
header and added to envelopes as thetrace
header.Specifically, this test shows a somewhat typical scenario for browser-side routing instrumentation where we initially have a low-quality URL txn name and only after a while update the name with a parameterized route. This test however also shows that we continue to update (i.e. not freeze) the DSC for subsequent transaction name updates. This is something we might want to change in the future, so that we only once set the
transaction
field when we have a high-quality txn name and freeze it afterwards, as discussed with @cleptric.For more information on the test scenario, take a look at the comment block in the test
Will open another PR with a Node integration test soon.