File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/browser/src/tracing Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {
1818 getIsolationScope ,
1919 getRootSpan ,
2020 registerSpanErrorInstrumentation ,
21+ spanIsSampled ,
2122 spanToJSON ,
2223 startIdleSpan ,
2324 withScope ,
@@ -297,13 +298,10 @@ export const browserTracingIntegration = ((_options: Partial<BrowserTracingOptio
297298 const scope = getCurrentScope ( ) ;
298299 const oldPropagationContext = scope . getPropagationContext ( ) ;
299300
300- const newDsc = oldPropagationContext . dsc || getDynamicSamplingContextFromSpan ( span ) ;
301- const newDscSampled = newDsc . sampled === 'true' ? true : newDsc . sampled === 'false' ? false : undefined ;
302-
303301 const newPropagationContext = {
304302 ...oldPropagationContext ,
305- sampled : newDscSampled ,
306- dsc : newDsc ,
303+ sampled : oldPropagationContext . sampled !== undefined ? oldPropagationContext . sampled : spanIsSampled ( span ) ,
304+ dsc : oldPropagationContext . dsc || getDynamicSamplingContextFromSpan ( span ) ,
307305 } ;
308306
309307 scope . setPropagationContext ( newPropagationContext ) ;
You can’t perform that action at this time.
0 commit comments