Skip to content

Commit a0692e5

Browse files
committed
revert reading sampled from DSC
1 parent 62f5e22 commit a0692e5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/browser/src/tracing/browserTracingIntegration.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)