Skip to content

feat(browser): Add support for streamed spans in cultureContextIntegration#20352

Merged
Lms24 merged 7 commits intodevelopfrom
lms/feat-browser-culture-context-streamed
Apr 17, 2026
Merged

feat(browser): Add support for streamed spans in cultureContextIntegration#20352
Lms24 merged 7 commits intodevelopfrom
lms/feat-browser-culture-context-streamed

Conversation

@Lms24
Copy link
Copy Markdown
Member

@Lms24 Lms24 commented Apr 16, 2026

This PR adds span processing support for the cultureContextIntegration plus a few integration API additions to make span processing on an integration level easier:

  • Integration::processSegmentSpan
  • Integration::processSpan
  • register a processSegmentSpan callback on cultureContextIntegration that adds the attributes. All attributes are already registered in sentry conventions: https://getsentry.github.io/sentry-conventions/attributes/culture/
  • adds a span streaming-specific integration test in addition to the already existing error/event-based integration test

closes #20353
closes #20354

@Lms24 Lms24 self-assigned this Apr 16, 2026
@Lms24 Lms24 marked this pull request as ready for review April 16, 2026 13:54
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 d6dedf6. Configure here.

Comment thread packages/browser/src/integrations/culturecontext.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 16, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.88 kB +0.37% +93 B 🔺
@sentry/browser - with treeshaking flags 24.35 kB +0.33% +78 B 🔺
@sentry/browser (incl. Tracing) 43.77 kB +0.28% +118 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 45.47 kB +0.25% +111 B 🔺
@sentry/browser (incl. Tracing, Profiling) 48.7 kB +0.24% +113 B 🔺
@sentry/browser (incl. Tracing, Replay) 82.89 kB +0.13% +101 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 72.4 kB +0.15% +103 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 87.58 kB +0.11% +95 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 99.83 kB +0.1% +97 B 🔺
@sentry/browser (incl. Feedback) 42.7 kB +0.27% +112 B 🔺
@sentry/browser (incl. sendFeedback) 30.55 kB +0.31% +93 B 🔺
@sentry/browser (incl. FeedbackAsync) 35.55 kB +0.29% +100 B 🔺
@sentry/browser (incl. Metrics) 27.16 kB +0.34% +90 B 🔺
@sentry/browser (incl. Logs) 27.29 kB +0.32% +87 B 🔺
@sentry/browser (incl. Metrics & Logs) 27.98 kB +0.32% +89 B 🔺
@sentry/react 27.62 kB +0.34% +91 B 🔺
@sentry/react (incl. Tracing) 46.01 kB +0.18% +82 B 🔺
@sentry/vue 30.7 kB +0.3% +89 B 🔺
@sentry/vue (incl. Tracing) 45.58 kB +0.21% +91 B 🔺
@sentry/svelte 25.89 kB +0.35% +89 B 🔺
CDN Bundle 28.55 kB +0.32% +89 B 🔺
CDN Bundle (incl. Tracing) 44.82 kB +0.22% +98 B 🔺
CDN Bundle (incl. Logs, Metrics) 29.93 kB +0.32% +94 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 45.91 kB +0.21% +94 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 68.83 kB +0.14% +95 B 🔺
CDN Bundle (incl. Tracing, Replay) 81.78 kB +0.13% +100 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 82.85 kB +0.11% +83 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 87.29 kB +0.11% +88 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 88.36 kB +0.11% +94 B 🔺
CDN Bundle - uncompressed 83.4 kB +0.34% +279 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 134.03 kB +0.21% +279 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 87.55 kB +0.32% +279 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 137.44 kB +0.21% +279 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 210.91 kB +0.14% +279 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 251.26 kB +0.12% +279 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 254.66 kB +0.11% +279 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 264.18 kB +0.11% +279 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 267.56 kB +0.11% +279 B 🔺
@sentry/nextjs (client) 48.54 kB +0.21% +98 B 🔺
@sentry/sveltekit (client) 44.18 kB +0.2% +85 B 🔺
@sentry/node-core 57.98 kB +0.08% +41 B 🔺
@sentry/node 174.81 kB +0.03% +46 B 🔺
@sentry/node - without tracing 97.93 kB +0.07% +59 B 🔺
@sentry/aws-serverless 115.16 kB +0.05% +47 B 🔺

View base workflow run

@Lms24 Lms24 requested review from chargome, mydea and nicohrubec April 17, 2026 06:45
Comment thread packages/browser/src/integrations/culturecontext.ts
Copy link
Copy Markdown
Member

@nicohrubec nicohrubec left a comment

Choose a reason for hiding this comment

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

lgtm!

@@ -1,5 +1,4 @@
import { defineIntegration } from '../integration';
import { hasSpanStreamingEnabled } from '../tracing/spans/hasSpanStreamingEnabled';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

seems like we are not emitting errors for unused imports during linting, should we change that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah I brought this up a while ago. +1 for erroring on lint warnings all together tbh

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yes agreed, seems like warnings usually get ignored so mostly add noise

@Lms24 Lms24 force-pushed the lms/feat-browser-culture-context-streamed branch from 3b97589 to 878ef99 Compare April 17, 2026 12:42
@Lms24 Lms24 enabled auto-merge (squash) April 17, 2026 12:44
@Lms24 Lms24 merged commit e9ab83a into develop Apr 17, 2026
478 of 480 checks passed
@Lms24 Lms24 deleted the lms/feat-browser-culture-context-streamed branch April 17, 2026 13:14
andreiborza pushed a commit that referenced this pull request Apr 20, 2026
…ration` (#20352)

This PR adds span processing support for the `cultureContextIntegration`
plus a few integration API additions to make span processing on an
integration level easier:

- `Integration::processSegmentSpan`
- `Integration::processSpan`
- register a `processSegmentSpan` callback on
`cultureContextIntegration` that adds the attributes. All attributes are
already registered in sentry conventions:
https://getsentry.github.io/sentry-conventions/attributes/culture/
- adds a span streaming-specific integration test in addition to the
already existing error/event-based integration test

closes #20353
closes #20354
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.

Support span streaming in cultureContextIntegration Add integration hooks to process (segment) spans

2 participants