Skip to content

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

Open
chargome wants to merge 10 commits intodevelopfrom
cg/streamed-span-op-attribute
Open

feat(core): Backfill otel attributes on streamed spans#20439
chargome wants to merge 10 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) 45.85 kB +0.7% +317 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.38 kB - -
@sentry/browser (incl. Feedback) 43.18 kB - -
@sentry/browser (incl. sendFeedback) 30.77 kB - -
@sentry/browser (incl. FeedbackAsync) 35.93 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 - -
CDN Bundle (incl. Tracing) 46.42 kB +0.66% +304 B 🔺
CDN Bundle (incl. Logs, Metrics) 30.03 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 47.48 kB +0.68% +318 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 68.99 kB - -
CDN Bundle (incl. Tracing, Replay) 83.5 kB +0.38% +316 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 84.53 kB +0.38% +318 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 89.31 kB +0.36% +314 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 90.38 kB +0.35% +315 B 🔺
CDN Bundle - uncompressed 83.91 kB - -
CDN Bundle (incl. Tracing) - uncompressed 138.75 kB +0.68% +932 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 88.06 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 142.16 kB +0.66% +932 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 211.63 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 256.19 kB +0.37% +932 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 259.59 kB +0.37% +932 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 269.89 kB +0.35% +932 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 273.28 kB +0.35% +932 B 🔺
@sentry/nextjs (client) 48.62 kB - -
@sentry/sveltekit (client) 44.33 kB - -
@sentry/node-core 58.75 kB +0.4% +231 B 🔺
@sentry/node 176.13 kB +0.17% +295 B 🔺
@sentry/node - without tracing 98.58 kB +0.27% +265 B 🔺
@sentry/aws-serverless 115.78 kB +0.23% +255 B 🔺

View base workflow run

@chargome chargome marked this pull request as ready for review April 22, 2026 09:07
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
@chargome chargome force-pushed the cg/streamed-span-op-attribute branch from 0c2d529 to d602203 Compare April 24, 2026 13:19
@chargome chargome marked this pull request as ready for review April 24, 2026 13:37
Comment thread packages/core/src/tracing/spans/captureSpan.ts
Comment thread packages/core/src/tracing/spans/captureSpan.ts
Comment thread packages/core/src/tracing/spans/captureSpan.ts
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 2 potential issues.

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 c2e1043. Configure here.

Comment thread packages/core/src/tracing/spans/captureSpan.ts
Comment thread packages/core/src/tracing/spans/captureSpan.ts
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