File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
packages/opentelemetry/src Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -11,5 +11,7 @@ Sentry.init({
1111} ) ;
1212
1313Sentry . startSpan ( { name : 'test span' } , ( ) => {
14- Sentry . captureException ( new Error ( 'foo' ) ) ;
14+ Sentry . startSpan ( { name : 'test inner span' } , ( ) => {
15+ Sentry . captureException ( new Error ( 'foo' ) ) ;
16+ } ) ;
1517} ) ;
Original file line number Diff line number Diff line change @@ -28,12 +28,13 @@ export function setupEventContextTrace(client: Client): void {
2828 ...event . contexts ,
2929 } ;
3030
31+ const rootSpan = getRootSpan ( span ) ;
32+
3133 event . sdkProcessingMetadata = {
32- dynamicSamplingContext : getDynamicSamplingContextFromSpan ( span ) ,
34+ dynamicSamplingContext : getDynamicSamplingContextFromSpan ( rootSpan ) ,
3335 ...event . sdkProcessingMetadata ,
3436 } ;
3537
36- const rootSpan = getRootSpan ( span ) ;
3738 const transactionName = spanHasName ( rootSpan ) ? rootSpan . name : undefined ;
3839 if ( transactionName && ! event . transaction ) {
3940 event . transaction = transactionName ;
You can’t perform that action at this time.
0 commit comments