Skip to content

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

Merged
merged 10 commits into from
Sep 15, 2022

Conversation

AbhiPrasad
Copy link
Member

ref #5679

As per spec change in getsentry/relay#1466, use previous source instead of current one when tracking name changes.

@AbhiPrasad AbhiPrasad added this to the Dynamic Sampling milestone Sep 13, 2022
@AbhiPrasad AbhiPrasad mentioned this pull request Sep 13, 2022
10 tasks
@AbhiPrasad AbhiPrasad force-pushed the abhi-prev-source-transaction-name-change branch from 9d5df3b to 9a0ab65 Compare September 13, 2022 16:09
@github-actions
Copy link
Contributor

github-actions bot commented Sep 13, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.51 KB (-0.08% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 60.26 KB (-0.05% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.1 KB (-0.06% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 53.18 KB (-0.05% 🔽)
@sentry/browser - Webpack (gzipped + minified) 19.89 KB (0%)
@sentry/browser - Webpack (minified) 64.59 KB (0%)
@sentry/react - Webpack (gzipped + minified) 19.92 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 44.83 KB (+0.03% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.03 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.41 KB (-0.01% 🔽)

@AbhiPrasad AbhiPrasad self-assigned this Sep 14, 2022
@AbhiPrasad AbhiPrasad requested a review from lforst September 14, 2022 10:00
@@ -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,
Copy link
Contributor

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"?

Copy link
Member Author

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.

@AbhiPrasad AbhiPrasad changed the title ref: Use previous source when logging name changes ref(tracing): Use previous source when logging name changes Sep 15, 2022
@AbhiPrasad AbhiPrasad enabled auto-merge (squash) September 15, 2022 11:09
@AbhiPrasad AbhiPrasad merged commit 51bc032 into master Sep 15, 2022
@AbhiPrasad AbhiPrasad deleted the abhi-prev-source-transaction-name-change branch September 15, 2022 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants