Skip to content
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(core): Decouple scope.transactionName from root spans #10991

Merged
merged 4 commits into from
Mar 12, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Mar 8, 2024

This PR makes some changes to how we apply scope data to events. Previously, we used to apply the transaction name

  1. from scopeData.transactionName
  2. if not already set in 1) the name of the root span

to the event.transaction field.

With our efforts to decouple the scope's transaction field from a currently active transaction/root span, we now change this behaviour so that:

  • only non-transaction events are assigned event.transaction from scopeData.transactionName (e.g. errors, profiles, replay)
  • only transaction events are assigned event.transaction from the root span name

Furthermore, this PR also undeprecates ScopeData.transactionName as we'll still need it.

ref #10846

Copy link
Contributor

github-actions bot commented Mar 8, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 76.98 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 68.24 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 72.12 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 61.79 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 32.44 KB (+0.03% 🔺)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 32.44 KB (+0.03% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.37 KB (+0.02% 🔺)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.37 KB (+0.02% 🔺)
@sentry/browser - Webpack (gzipped) 22.56 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) - CDN Bundle (gzipped) 75.08 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - CDN Bundle (gzipped) 66.69 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - CDN Bundle (gzipped) 32.54 KB (+0.04% 🔺)
@sentry/browser - CDN Bundle (gzipped) 24.02 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay) - CDN Bundle (minified & uncompressed) 209.07 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing) - CDN Bundle (minified & uncompressed) 97.87 KB (+0.05% 🔺)
@sentry/browser - CDN Bundle (minified & uncompressed) 71.77 KB (+0.07% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 68.44 KB (+0.01% 🔺)
@sentry/react - Webpack (gzipped) 22.59 KB (+0.04% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 84.95 KB (+0.01% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 49.35 KB (+0.03% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.42 KB (+0.07% 🔺)

@Lms24 Lms24 requested review from a team, lforst, AbhiPrasad, mydea and s1gr1d and removed request for a team March 8, 2024 16:02
@Lms24 Lms24 self-assigned this Mar 8, 2024
@@ -81,6 +81,9 @@ export class Scope implements ScopeInterface {

/**
* Transaction Name
*
* IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 good comment!

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! left some small nits but overall looks good to me 👍

@Lms24 Lms24 force-pushed the lms/feat-core-scopedata-transactionName branch from 45b7d13 to 81e048b Compare March 11, 2024 13:29
@Lms24 Lms24 merged commit 40c847c into develop Mar 12, 2024
91 checks passed
@Lms24 Lms24 deleted the lms/feat-core-scopedata-transactionName branch March 12, 2024 10:41
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