File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
dev-packages/browser-integration-tests/suites/integrations/featureFlags/growthbook/onSpan Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1- document . getElementById ( 'error' ) . addEventListener ( 'click' , ( ) => {
2- // no-op
3- } ) ;
1+ const btnStartSpan = document . getElementById ( 'btnStartSpan' ) ;
2+ const btnEndSpan = document . getElementById ( 'btnEndSpan' ) ;
3+ const btnStartNestedSpan = document . getElementById ( 'btnStartNestedSpan' ) ;
4+ const btnEndNestedSpan = document . getElementById ( 'btnEndNestedSpan' ) ;
5+
6+ window . withNestedSpans = callback => {
7+ window . Sentry . startSpan ( { name : 'test-root-span' } , rootSpan => {
8+ window . traceId = rootSpan . spanContext ( ) . traceId ;
9+
10+ window . Sentry . startSpan ( { name : 'test-span' } , _span => {
11+ window . Sentry . startSpan ( { name : 'test-nested-span' } , _nestedSpan => {
12+ callback ( ) ;
13+ } ) ;
14+ } ) ;
15+ } ) ;
16+ } ;
Original file line number Diff line number Diff line change 44 < meta charset ="utf-8 " />
55 </ head >
66 < body >
7- < button id ="error "> Throw Error</ button >
7+ < button id ="btnStartSpan "> Start Span</ button >
8+ < button id ="btnEndSpan "> End Span</ button >
9+ < button id ="btnStartNestedSpan "> Start Nested Span</ button >
10+ < button id ="btnEndNestedSpan "> End Nested Span</ button >
811 </ body >
912 < script src ="./subject.js "> </ script >
1013</ html >
You can’t perform that action at this time.
0 commit comments