Skip to content

feat(core): Convert scope contexts to segment span attributes in span streaming#20828

Draft
chargome wants to merge 2 commits into
developfrom
cg-applyScopeToSegmentSpan
Draft

feat(core): Convert scope contexts to segment span attributes in span streaming#20828
chargome wants to merge 2 commits into
developfrom
cg-applyScopeToSegmentSpan

Conversation

@chargome
Copy link
Copy Markdown
Member

  • Implements applyScopeToSegmentSpan in the captureSpan pipeline to convert known scope
    contexts (set via scope.setContext()) to segment span attributes
  • Only maps browser-relevant contexts in core: response, profile, cloud_resource, culture, state, angular, react
  • Server-only contexts (aws, gcp, missing_instrumentation, trpc) will be handled by processSegmentSpan hooks in their respective packages in a follow-up PR

ref #20385

@chargome chargome self-assigned this May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 26.87 kB - -
@sentry/browser - with treeshaking flags 25.3 kB - -
@sentry/browser (incl. Tracing) 44.77 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47 kB +0.56% +259 B 🔺
@sentry/browser (incl. Tracing, Profiling) 49.76 kB - -
@sentry/browser (incl. Tracing, Replay) 84.4 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 73.83 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.1 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 101.74 kB - -
@sentry/browser (incl. Feedback) 44.05 kB - -
@sentry/browser (incl. sendFeedback) 31.68 kB - -
@sentry/browser (incl. FeedbackAsync) 36.79 kB - -
@sentry/browser (incl. Metrics) 27.95 kB - -
@sentry/browser (incl. Logs) 28.1 kB - -
@sentry/browser (incl. Metrics & Logs) 28.78 kB - -
@sentry/react 28.62 kB - -
@sentry/react (incl. Tracing) 47.03 kB - -
@sentry/vue 31.79 kB - -
@sentry/vue (incl. Tracing) 46.64 kB - -
@sentry/svelte 26.89 kB - -
CDN Bundle 29.25 kB - -
CDN Bundle (incl. Tracing) 47.45 kB +0.61% +285 B 🔺
CDN Bundle (incl. Logs, Metrics) 30.62 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 48.56 kB +0.58% +279 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 69.96 kB - -
CDN Bundle (incl. Tracing, Replay) 84.83 kB +0.34% +285 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 85.89 kB +0.33% +275 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 90.64 kB +0.32% +281 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 91.74 kB +0.31% +278 B 🔺
CDN Bundle - uncompressed 86.03 kB - -
CDN Bundle (incl. Tracing) - uncompressed 142.37 kB +0.63% +890 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 90.22 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 145.83 kB +0.62% +890 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 215.05 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 261.08 kB +0.35% +890 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 264.53 kB +0.34% +890 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 274.78 kB +0.33% +890 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 278.22 kB +0.33% +890 B 🔺
@sentry/nextjs (client) 49.55 kB - -
@sentry/sveltekit (client) 45.26 kB - -
@sentry/node-core 61.05 kB +0.38% +229 B 🔺
@sentry/node 166.26 kB +0.19% +307 B 🔺
@sentry/node - without tracing 74.22 kB +0.37% +272 B 🔺
@sentry/aws-serverless 108.31 kB +0.25% +260 B 🔺
@sentry/cloudflare (withSentry) - minified 171.58 kB +0.56% +953 B 🔺
@sentry/cloudflare (withSentry) 432.47 kB +0.48% +2.06 kB 🔺

View base workflow run

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.

1 participant