File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageloadWithChildSpanTimeout Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 11import * as Sentry from '@sentry/browser' ;
2- import { startSpanManual } from '@sentry/browser' ;
32
43window . Sentry = Sentry ;
54
@@ -8,13 +7,18 @@ Sentry.init({
87 integrations : [
98 Sentry . browserTracingIntegration ( {
109 // To avoid having this test run for 15s
11- childSpanTimeout : 5000 ,
10+ childSpanTimeout : 4000 ,
1211 } ) ,
1312 ] ,
1413 defaultIntegrations : false ,
1514 tracesSampleRate : 1 ,
1615} ) ;
1716
18- setTimeout ( ( ) => {
19- startSpanManual ( { name : 'pageload-child-span' } , ( ) => { } ) ;
20- } , 200 ) ;
17+ const activeSpan = Sentry . getActiveSpan ( ) ;
18+ if ( activeSpan ) {
19+ Sentry . startInactiveSpan ( { name : 'pageload-child-span' } ) ;
20+ } else {
21+ setTimeout ( ( ) => {
22+ Sentry . startInactiveSpan ( { name : 'pageload-child-span' } ) ;
23+ } , 200 ) ;
24+ }
You can’t perform that action at this time.
0 commit comments