File tree 2 files changed +6
-3
lines changed
packages/opentelemetry/src
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -11,5 +11,7 @@ Sentry.init({
11
11
} ) ;
12
12
13
13
Sentry . startSpan ( { name : 'test span' } , ( ) => {
14
- Sentry . captureException ( new Error ( 'foo' ) ) ;
14
+ Sentry . startSpan ( { name : 'test inner span' } , ( ) => {
15
+ Sentry . captureException ( new Error ( 'foo' ) ) ;
16
+ } ) ;
15
17
} ) ;
Original file line number Diff line number Diff line change @@ -28,12 +28,13 @@ export function setupEventContextTrace(client: Client): void {
28
28
...event . contexts ,
29
29
} ;
30
30
31
+ const rootSpan = getRootSpan ( span ) ;
32
+
31
33
event . sdkProcessingMetadata = {
32
- dynamicSamplingContext : getDynamicSamplingContextFromSpan ( span ) ,
34
+ dynamicSamplingContext : getDynamicSamplingContextFromSpan ( rootSpan ) ,
33
35
...event . sdkProcessingMetadata ,
34
36
} ;
35
37
36
- const rootSpan = getRootSpan ( span ) ;
37
38
const transactionName = spanHasName ( rootSpan ) ? rootSpan . name : undefined ;
38
39
if ( transactionName && ! event . transaction ) {
39
40
event . transaction = transactionName ;
You can’t perform that action at this time.
0 commit comments