-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(tracing): Use previous source when logging name changes #5733
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
9d5df3b
to
9a0ab65
Compare
size-limit report 📦
|
packages/tracing/src/transaction.ts
Outdated
@@ -80,7 +80,8 @@ export class Transaction extends SpanClass implements TransactionInterface { | |||
// parameterized by virtue of having no parameters in its path | |||
if (name !== this.name || source !== this.metadata.source) { | |||
this.metadata.changes.push({ | |||
source, | |||
// log previous source | |||
source: this.metadata.source || source, |
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.
Idk about this fallback 🤔 I know this is probably just to make TS happy since the source in metadata might be undefined but in reality, it always has a source. Should we maybe add a comment explaining this?
Or shouldn't the fallback be "custom"
?
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.
you're right - I changed it so that the transaction always defaults to custom
, unless explicitly set in metadata.
ref #5679
As per spec change in getsentry/relay#1466, use previous source instead of current one when tracking name changes.