File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ import { makeFetchTransport } from './transports/fetch';
2525import { normalizeStringifyValue } from './normalizeStringifyValue' ;
2626import { checkAndWarnIfIsEmbeddedBrowserExtension } from './utils/detectBrowserExtension' ;
2727
28+ declare const __SENTRY_TRACING__ : boolean ;
29+
2830/** Get the default integrations for the browser SDK. */
2931export function getDefaultIntegrations ( _options : Options ) : Integration [ ] {
3032 /**
@@ -116,7 +118,11 @@ export function init(options: BrowserOptions = {}): Client | undefined {
116118 defaultIntegrations,
117119 } ) ;
118120
119- if ( options . traceLifecycle !== 'static' && ! integrations . some ( integration => integration . name === 'SpanStreaming' ) ) {
121+ if (
122+ ( typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__ ) &&
123+ options . traceLifecycle !== 'static' &&
124+ ! integrations . some ( integration => integration . name === 'SpanStreaming' )
125+ ) {
120126 integrations . push ( spanStreamingIntegration ( ) ) ;
121127 }
122128
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ export interface ServerRuntimeClientOptions extends ClientOptions<BaseTransportO
2525 serverName ?: string ;
2626}
2727
28+ declare const __SENTRY_TRACING__ : boolean ;
29+
2830/**
2931 * The Sentry Server Runtime Client SDK.
3032 */
@@ -43,7 +45,11 @@ export class ServerRuntimeClient<
4345 // When span streaming is enabled (`traceLifecycle: 'stream'`), the `spanStreamingIntegration`
4446 // is required to flush spans. We add it here so the individual server SDKs don't have to.
4547 // A user-provided `spanStreamingIntegration` always takes precedence over the one we add.
46- if ( options . traceLifecycle !== 'static' && ! options . integrations . some ( i => i . name === 'SpanStreaming' ) ) {
48+ if (
49+ ( typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__ ) &&
50+ options . traceLifecycle !== 'static' &&
51+ ! options . integrations . some ( i => i . name === 'SpanStreaming' )
52+ ) {
4753 options . integrations . push ( spanStreamingIntegration ( ) ) ;
4854 }
4955
You can’t perform that action at this time.
0 commit comments