-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(core)!: Enable span streaming by default #22642
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
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 |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ import { globalHandlersIntegration } from './integrations/globalhandlers'; | |
| import { httpContextIntegration } from './integrations/httpcontext'; | ||
| import { linkedErrorsIntegration } from './integrations/linkederrors'; | ||
| import { spotlightBrowserIntegration } from './integrations/spotlight'; | ||
| import { spanStreamingIntegration } from './integrations/spanstreaming'; | ||
| import { defaultStackParser } from './stack-parsers'; | ||
| import { makeFetchTransport } from './transports/fetch'; | ||
| import { normalizeStringifyValue } from './normalizeStringifyValue'; | ||
|
|
@@ -110,14 +111,20 @@ export function init(options: BrowserOptions = {}): Client | undefined { | |
| } | ||
| /*! rollup-include-development-only-end */ | ||
|
|
||
| const integrations = getIntegrationsToSetup({ | ||
| integrations: options.integrations, | ||
| defaultIntegrations, | ||
| }); | ||
|
|
||
| if (options.traceLifecycle !== 'static' && !integrations.some(integration => integration.name === 'SpanStreaming')) { | ||
| integrations.push(spanStreamingIntegration()); | ||
| } | ||
|
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. Missing integration or E2E testsMedium Severity This violates the Testing Conventions rule for Triggered by project rule: PR Review Guidelines for Cursor Bot Reviewed by Cursor Bugbot for commit 2eeaff8. Configure here. |
||
|
|
||
| const clientOptions: BrowserClientOptions = { | ||
| ...options, | ||
| enabled: shouldDisableBecauseIsBrowserExtenstion ? false : options.enabled, | ||
| stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser), | ||
| integrations: getIntegrationsToSetup({ | ||
| integrations: options.integrations, | ||
| defaultIntegrations, | ||
| }), | ||
| integrations, | ||
| transport: options.transport || makeFetchTransport, | ||
| }; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -234,7 +234,7 @@ export abstract class Client<O extends ClientOptions = ClientOptions> { | |
| * @param options Options for the client. | ||
| */ | ||
| protected constructor(options: O) { | ||
| this._options = { attachStacktrace: true, ...options }; | ||
| this._options = { attachStacktrace: true, traceLifecycle: 'stream', ...options }; | ||
|
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. Stream default drops browser spansHigh Severity Defaulting Additional Locations (1)Reviewed by Cursor Bugbot for commit 2eeaff8. Configure here. |
||
| this._integrations = {}; | ||
| this._numProcessing = 0; | ||
| this._outcomes = {}; | ||
|
|
||


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
Medium Severity
This violates the review rule on large browser bundle size increases. Importing
spanStreamingIntegrationintosdk.tspulls SpanBuffer and related streaming code into every bundle that shipsinit, including non-tracing CDN entry points that previously only exposed a shim.Additional Locations (1)
packages/browser/src/sdk.ts#L118-L121Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 2eeaff8. Configure here.