-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(browser): Set custom sentry source correctly #11735
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
Conversation
size-limit report 📦
|
if (finalStartSpanOptions.name !== finalStartSpanOptions.name) { | ||
// If `finalStartSpanOptions.name` is different than `startSpanOptions.name` | ||
// it is because `beforeStartSpan` set a custom name. Therefore we set the source to 'custom'. | ||
if (startSpanOptions.name !== finalStartSpanOptions.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.
This is the change. I'm not sure how the tests were passing 🤔
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.
OMG 🤯
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.
I guess we never tested starting a pageload/navigation txn with beforeStartSpan
🤔
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.
Great catch and also good cleanup!
The primary change is to make
finalStartSpanOptions.name !== finalStartSpanOptions.name
->startSpanOptions.name !== finalStartSpanOptions.name
inpackages/browser/src/tracing/browserTracingIntegration.ts
.While I was here though I cleaned up some other code to improve bundle size. Let me know if you want me to extract the cleanup changes, I figured it's all easier to review here with the same context.