Skip to content

Commit a1dc134

Browse files
committed
adjust sentry.span.source to changes
1 parent 0d48e38 commit a1dc134

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/core/src/tracing/dynamicSamplingContext.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE,
77
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
88
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
9-
SEMANTIC_ATTRIBUTE_SENTRY_SPAN_SOURCE,
109
} from '../semanticAttributes';
1110
import type { DynamicSamplingContext } from '../types-hoist/envelope';
1211
import type { Span } from '../types-hoist/span';
@@ -120,9 +119,8 @@ export function getDynamicSamplingContextFromSpan(span: Span): Readonly<Partial<
120119
const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client);
121120

122121
// We don't want to have a transaction name in the DSC if the source is "url" because URLs might contain PII
123-
// TODO(v11): Only read `sentry.span.source` to determine the source
124-
const source =
125-
rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ?? rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SPAN_SOURCE];
122+
// TODO(v11): Only read `SEMANTIC_ATTRIBUTE_SENTRY_SOURCE` again, once we renamed it to `sentry.span.source`
123+
const source = rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ?? rootSpanAttributes['sentry.span.source'];
126124

127125
// after JSON conversion, txn.name becomes jsonSpan.description
128126
const name = rootSpanJson.description;

0 commit comments

Comments
 (0)