Skip to content

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

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

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

Conversation

@Lms24

@Lms24Lms24 commented Apr 16, 2026

Copy link
Copy Markdown
Member

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

@Lms24Lms24 self-assigned this Apr 16, 2026
@Lms24
Lms24 marked this pull request as ready for review April 16, 2026 13:54

@cursorcursorBot left a comment

Copy link
Copy Markdown

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 threadpackages/browser/src/integrations/culturecontext.ts Outdated
@github-actions

github-actionsBot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser25.88 kB+0.37%+93 B 🔺
@sentry/browser - with treeshaking flags24.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 flags72.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/react27.62 kB+0.34%+91 B 🔺
@sentry/react (incl. Tracing)46.01 kB+0.18%+82 B 🔺
@sentry/vue30.7 kB+0.3%+89 B 🔺
@sentry/vue (incl. Tracing)45.58 kB+0.21%+91 B 🔺
@sentry/svelte25.89 kB+0.35%+89 B 🔺
CDN Bundle28.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 - uncompressed83.4 kB+0.34%+279 B 🔺
CDN Bundle (incl. Tracing) - uncompressed134.03 kB+0.21%+279 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed87.55 kB+0.32%+279 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed137.44 kB+0.21%+279 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed210.91 kB+0.14%+279 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed251.26 kB+0.12%+279 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed254.66 kB+0.11%+279 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed264.18 kB+0.11%+279 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed267.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-core57.98 kB+0.08%+41 B 🔺
@sentry/node174.81 kB+0.03%+46 B 🔺
@sentry/node - without tracing97.93 kB+0.07%+59 B 🔺
@sentry/aws-serverless115.16 kB+0.05%+47 B 🔺

View base workflow run

Comment threadpackages/browser/src/integrations/culturecontext.ts

@nicohrubecnicohrubec left a comment

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.

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
MemberAuthor

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
Lms24force-pushed the lms/feat-browser-culture-context-streamed branch from 3b97589 to 878ef99CompareApril 17, 2026 12:42
@Lms24
Lms24 enabled auto-merge (squash) April 17, 2026 12:44
@Lms24
Lms24 merged commit e9ab83a into developApr 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#20353closes#20354
Sign up for freeto 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

@Lms24@nicohrubec