Skip to content

feat(core): Backfill otel attributes on streamed spans#20439

Draft
chargome wants to merge 6 commits intodevelopfrom
cg/streamed-span-op-attribute
Draft

feat(core): Backfill otel attributes on streamed spans#20439
chargome wants to merge 6 commits intodevelopfrom
cg/streamed-span-op-attribute

Conversation

@chargome
Copy link
Copy Markdown
Member

@chargome chargome commented Apr 22, 2026

The streaming path skips the SentrySpanExporter, which is why we backfill span data (sentry.op, name, sentry.source) in captureSpan now. Some of the inference logic is duplicated from the otel package — which we can likely drop once we move away from otel.

closes #20425

@chargome chargome self-assigned this Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.96 kB - -
@sentry/browser - with treeshaking flags 24.44 kB - -
@sentry/browser (incl. Tracing) 43.89 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 46.02 kB +1.07% +486 B 🔺
@sentry/browser (incl. Tracing, Profiling) 48.84 kB - -
@sentry/browser (incl. Tracing, Replay) 83.09 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 72.59 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 87.77 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 100.03 kB - -
@sentry/browser (incl. Feedback) 42.78 kB - -
@sentry/browser (incl. sendFeedback) 30.64 kB - -
@sentry/browser (incl. FeedbackAsync) 35.64 kB - -
@sentry/browser (incl. Metrics) 27.25 kB - -
@sentry/browser (incl. Logs) 27.38 kB - -
@sentry/browser (incl. Metrics & Logs) 28.07 kB - -
@sentry/react 27.72 kB - -
@sentry/react (incl. Tracing) 46.13 kB - -
@sentry/vue 30.81 kB - -
@sentry/vue (incl. Tracing) 45.71 kB - -
@sentry/svelte 25.98 kB - -
CDN Bundle 28.66 kB +0.01% +2 B 🔺
⛔️ CDN Bundle (incl. Tracing) (max: 46.5 kB) 46.57 kB +1% +457 B 🔺
CDN Bundle (incl. Logs, Metrics) 30.04 kB +0.04% +12 B 🔺
⛔️ CDN Bundle (incl. Tracing, Logs, Metrics) (max: 47.5 kB) 47.67 kB +1.07% +503 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 69 kB +0.01% +6 B 🔺
⛔️ CDN Bundle (incl. Tracing, Replay) (max: 83.5 kB) 83.66 kB +0.57% +467 B 🔺
⛔️ CDN Bundle (incl. Tracing, Replay, Logs, Metrics) (max: 84.5 kB) 84.71 kB +0.59% +494 B 🔺
⛔️ CDN Bundle (incl. Tracing, Replay, Feedback) (max: 89 kB) 89.13 kB +0.52% +456 B 🔺
⛔️ CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) (max: 90 kB) 90.23 kB +0.54% +476 B 🔺
CDN Bundle - uncompressed 83.91 kB - -
⛔️ CDN Bundle (incl. Tracing) - uncompressed (max: 138 kB) 139.07 kB +0.91% +1.25 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 88.06 kB - -
⛔️ CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed (max: 141.5 kB) 142.48 kB +0.89% +1.25 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 211.63 kB - -
⛔️ CDN Bundle (incl. Tracing, Replay) - uncompressed (max: 255.5 kB) 256.51 kB +0.49% +1.25 kB 🔺
⛔️ CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed (max: 259 kB) 259.9 kB +0.49% +1.25 kB 🔺
⛔️ CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed (max: 269 kB) 269.42 kB +0.47% +1.25 kB 🔺
⛔️ CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed (max: 272 kB) 272.81 kB +0.46% +1.25 kB 🔺
@sentry/nextjs (client) 48.66 kB - -
@sentry/sveltekit (client) 44.33 kB - -
@sentry/node-core 58.82 kB +0.53% +305 B 🔺
@sentry/node 176.2 kB +0.21% +369 B 🔺
@sentry/node - without tracing 98.66 kB +0.36% +345 B 🔺
@sentry/aws-serverless 115.85 kB +0.29% +332 B 🔺

View base workflow run

@chargome chargome marked this pull request as ready for review April 22, 2026 09:07
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 58f793c. Configure here.

Comment thread packages/opentelemetry/test/sampler.test.ts Outdated
@chargome chargome marked this pull request as draft April 22, 2026 14:25
@chargome
Copy link
Copy Markdown
Member Author

will find another way of doing this

@chargome chargome force-pushed the cg/streamed-span-op-attribute branch from 73ad7b6 to ae0c9db Compare April 22, 2026 14:58
@chargome chargome changed the title feat(opentelemetry): Propagate inferred sentry.op onto streamed span attributes feat(core): Backfill sentry.op on streamed spans from OTel semantic conventions Apr 22, 2026
@chargome chargome changed the title feat(core): Backfill sentry.op on streamed spans from OTel semantic conventions feat(core): Backfill sentry.op on streamed spans Apr 22, 2026
@JPeer264 JPeer264 removed their request for review April 22, 2026 16:17
@chargome chargome changed the title feat(core): Backfill sentry.op on streamed spans feat(core): Backfill otel attrbiutes on streamed spans Apr 24, 2026
@chargome chargome changed the title feat(core): Backfill otel attrbiutes on streamed spans feat(core): Backfill otel attributes on streamed spans Apr 24, 2026
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.

Backfill sentry.op for streamed client.http spans

1 participant