diff --git a/packages/browser/src/tracing/browserTracingIntegration.ts b/packages/browser/src/tracing/browserTracingIntegration.ts index 5bbda349b25d..d907e5b3d8d6 100644 --- a/packages/browser/src/tracing/browserTracingIntegration.ts +++ b/packages/browser/src/tracing/browserTracingIntegration.ts @@ -24,7 +24,6 @@ import { getDynamicSamplingContextFromSpan, getIsolationScope, getLocationHref, - getRootSpan, logger, propagationContextFromHeaders, registerSpanErrorInstrumentation, @@ -276,6 +275,19 @@ export const browserTracingIntegration = ((_options: Partial { - const op = spanToJSON(span).op; - if (span !== getRootSpan(span) || (op !== 'navigation' && op !== 'pageload')) { - return; - } - - const scope = getCurrentScope(); - const oldPropagationContext = scope.getPropagationContext(); - - scope.setPropagationContext({ - ...oldPropagationContext, - sampled: oldPropagationContext.sampled !== undefined ? oldPropagationContext.sampled : spanIsSampled(span), - dsc: oldPropagationContext.dsc || getDynamicSamplingContextFromSpan(span), - }); - }); - if (WINDOW.location) { if (instrumentPageLoad) { const origin = browserPerformanceTimeOrigin();