Skip to content

feat: Span Streaming - #1400

Merged
timfish merged 12 commits into
masterfrom
feat/span-streaming-2
Aug 17, 2026
Merged

feat: Span Streaming#1400
timfish merged 12 commits into
masterfrom
feat/span-streaming-2

Conversation

@timfish

@timfish timfish commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Tests span streaming mode and ensures and startupTracingIntegration works when this mode is enabled.

cursor[bot]

This comment was marked as outdated.

Comment thread src/main/integrations/normalize-paths.ts
@timfish
timfish requested a review from Lms24 July 8, 2026 08:44

@Lms24 Lms24 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.

This looks mostly good to me, thanks for taking this on!

Two comments we should address:

  • the timing issue when merging startup and pageload spans
  • do we still need users to set spanStreamingIntegration()?

All other comments are nits/recommendations, so feel free to disregard them/follow-up on in later PRs.

Comment thread src/main/normalize.ts Outdated
Comment thread src/main/normalize.ts Outdated
Comment thread src/main/integrations/startup-tracing.ts Outdated
Comment thread src/main/integrations/normalize-paths.ts Outdated
Comment thread test/e2e/test-apps/span-streaming/custom-tracing/src/main.js Outdated
Comment thread src/main/integrations/startup-tracing.ts Outdated
timfish added 7 commits July 29, 2026 12:46
The renderer SDK flushes streamed spans on an interval so the pageload
span tree can arrive over multiple envelopes. Since the pageload segment
gets re-created in the startup trace, pageload spans sent directly from
earlier envelopes would reference a segment that is never sent. We now
buffer streamed span envelopes while waiting for the renderer pageload
and merge all spans from the pageload trace into the startup span.
Buffered spans from other traces are forwarded unmodified once the wait
ends.
Numeric attribute types are inferred from the value so whole numbers get
typed 'integer' and fractional values 'double'.
Comment thread src/main/integrations/startup-tracing.ts Outdated
Comment thread src/main/integrations/startup-tracing.ts Outdated

@cursor cursor Bot 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 d40e90d. Configure here.

Comment thread src/main/integrations/streamed-renderer-spans.ts
Comment thread src/main/ipc.ts
@timfish
timfish requested a review from Lms24 August 11, 2026 18:06

@Lms24 Lms24 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.

Nice, thanks for applying my suggestions! The buffering approach now looks correct to me.

Comment thread src/main/ipc.ts
Comment on lines +132 to +135
if (extractTraceId) {
extracted.push(...container.items.filter((span) => span.trace_id === extractTraceId));
container.items = container.items.filter((span) => span.trace_id !== extractTraceId);
}

@Lms24 Lms24 Aug 12, 2026

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.

super-l: Span envelopes always only carry spans of one specific traceId. So, these checks shouldn't be necessary. But they don't hurt either and it's a good safety measure. Happy to leave this up to you.

Comment thread package.json
},
"dependencies": {
"@sentry/browser": "10.67.0",
"@sentry/conventions": "^0.16.0",

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.

super-l: 0.19.0 is the latest version but if you wanna stay in lockstep with v10 of the JS repo, 0.16.0 is fine.

@timfish
timfish merged commit 274d6f5 into master Aug 17, 2026
116 checks passed
@timfish
timfish deleted the feat/span-streaming-2 branch August 17, 2026 10:04
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.

2 participants