File tree Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ export {
60
60
browserTracingIntegration ,
61
61
startBrowserTracingNavigationSpan ,
62
62
startBrowserTracingPageLoadSpan ,
63
+ disableDefaultBrowserTracingNavigationSpan ,
64
+ disableDefaultBrowserTracingPageLoadSpan ,
63
65
} from '@sentry-internal/tracing' ;
64
66
export type { RequestInstrumentationOptions } from '@sentry-internal/tracing' ;
65
67
export {
Original file line number Diff line number Diff line change @@ -458,6 +458,22 @@ export function startBrowserTracingNavigationSpan(spanOptions: StartSpanOptions)
458
458
shouldUseDefaultNavigationSpan = false ;
459
459
}
460
460
461
+ /**
462
+ * Use this method if you want to disable the default navigation span.
463
+ * This is useful if you want to add custom routing instrumentation.
464
+ */
465
+ export function disableDefaultBrowserTracingNavigationSpan ( disable = true ) : void {
466
+ shouldUseDefaultNavigationSpan = ! disable ;
467
+ }
468
+
469
+ /**
470
+ * Use this method if you want to disable the default page load span.
471
+ * This is useful if you want to add custom routing instrumentation.
472
+ */
473
+ export function disableDefaultBrowserTracingPageLoadSpan ( disable = true ) : void {
474
+ shouldUseDefaultPageLoadSpan = ! disable ;
475
+ }
476
+
461
477
/** Returns the value of a meta tag */
462
478
export function getMetaContent ( metaName : string ) : string | undefined {
463
479
// Can't specify generic to `getDomElement` because tracing can be used
Original file line number Diff line number Diff line change 7
7
browserTracingIntegration ,
8
8
startBrowserTracingNavigationSpan ,
9
9
startBrowserTracingPageLoadSpan ,
10
+ disableDefaultBrowserTracingNavigationSpan ,
11
+ disableDefaultBrowserTracingPageLoadSpan ,
10
12
} from './browserTracingIntegration' ;
11
13
12
14
export { instrumentOutgoingRequests , defaultRequestInstrumentationOptions } from './request' ;
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ export {
17
17
browserTracingIntegration ,
18
18
startBrowserTracingNavigationSpan ,
19
19
startBrowserTracingPageLoadSpan ,
20
+ disableDefaultBrowserTracingNavigationSpan ,
21
+ disableDefaultBrowserTracingPageLoadSpan ,
20
22
BROWSER_TRACING_INTEGRATION_ID ,
21
23
instrumentOutgoingRequests ,
22
24
defaultRequestInstrumentationOptions ,
You can’t perform that action at this time.
0 commit comments