-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(browser): Apply Http timing attributes to streamed http.client spans
#19643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
43f10ab
526846a
6b0eb4f
7d0fe48
e60978f
8bb267b
fc373de
9502ae0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,12 @@ export const spanStreamingIntegration = defineIntegration(() => { | |
| // In addition to capturing the span, we also flush the trace when the segment | ||
| // span ends to ensure things are sent timely. We never know when the browser | ||
| // is closed, users navigate away, etc. | ||
| client.on('afterSegmentSpanEnd', segmentSpan => buffer.flush(segmentSpan.spanContext().traceId)); | ||
| client.on('afterSegmentSpanEnd', segmentSpan => { | ||
| const traceId = segmentSpan.spanContext().traceId; | ||
| setTimeout(() => { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. q/l: Should we wrap this in our safeUnref function? Or is this guaranteed to run only on the browser?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's guaranteed to only run in the browser. There will be a dedicated server-side |
||
| buffer.flush(traceId); | ||
| }, 500); | ||
| }); | ||
| }, | ||
| }; | ||
| }) satisfies IntegrationFn; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Browser bundle size increase flagged per project rules
Low Severity
The CDN Bundle (incl. Tracing) uncompressed size limit increased from 129 KB to 130 KB (~0.8% increase). Per the project rules, large bundle size increases in browser packages need to be flagged even when unavoidable. The PR description acknowledges this trade-off for adding HTTP timing support to streamed spans.
Triggered by project rule: PR Review Guidelines for Cursor Bot