@@ -329,6 +329,9 @@ export const _browserTracingIntegration = ((_options: Partial<BrowserTracingOpti
329
329
330
330
if ( client . on ) {
331
331
client . on ( 'startNavigationSpan' , ( context : StartSpanOptions ) => {
332
+ // We check this inside of the hook handler, so that if a custom instrumentation triggers this,
333
+ // we don't need to check this option in the instrumentation, but can simply invoke it
334
+ // without needing to know the options of this integration
332
335
if ( ! options . instrumentNavigation ) {
333
336
return ;
334
337
}
@@ -342,6 +345,9 @@ export const _browserTracingIntegration = ((_options: Partial<BrowserTracingOpti
342
345
} ) ;
343
346
344
347
client . on ( 'startPageLoadSpan' , ( context : StartSpanOptions ) => {
348
+ // We check this inside of the hook handler, so that if a custom instrumentation triggers this,
349
+ // we don't need to check this option in the instrumentation, but can simply invoke it
350
+ // without needing to know the options of this integration
345
351
if ( ! options . instrumentPageLoad ) {
346
352
return ;
347
353
}
@@ -385,6 +391,7 @@ export const _browserTracingIntegration = ((_options: Partial<BrowserTracingOpti
385
391
386
392
if ( from !== to ) {
387
393
startingUrl = undefined ;
394
+ // We check this in here again, as a custom instrumentation may have been triggered in the meanwhile
388
395
if ( shouldUseDefaultNavigationSpan ) {
389
396
const context : StartSpanOptions = {
390
397
name : WINDOW . location . pathname ,
0 commit comments