@@ -9,7 +9,7 @@ import type { Client, SpanAttributes } from '@sentry/types';
9
9
import { logger } from '@sentry/utils' ;
10
10
import { SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING , SENTRY_TRACE_STATE_URL } from './constants' ;
11
11
12
- import { SEMATTRS_HTTP_METHOD } from '@opentelemetry/semantic-conventions' ;
12
+ import { SEMATTRS_HTTP_METHOD , SEMATTRS_HTTP_URL } from '@opentelemetry/semantic-conventions' ;
13
13
import { DEBUG_BUILD } from './debug-build' ;
14
14
import { getPropagationContextFromSpan } from './propagator' ;
15
15
import { getSamplingDecision } from './utils/getSamplingDecision' ;
@@ -43,7 +43,7 @@ export class SentrySampler implements Sampler {
43
43
let traceState = parentContext ?. traceState || new TraceState ( ) ;
44
44
45
45
// We always keep the URL on the trace state, so we can access it in the propagator
46
- const url = spanAttributes [ SemanticAttributes . HTTP_URL ] ;
46
+ const url = spanAttributes [ SEMATTRS_HTTP_URL ] ;
47
47
if ( url && typeof url === 'string' ) {
48
48
traceState = traceState . set ( SENTRY_TRACE_STATE_URL , url ) ;
49
49
}
@@ -56,7 +56,7 @@ export class SentrySampler implements Sampler {
56
56
// but we want to leave downstream sampling decisions up to the server
57
57
if (
58
58
spanKind === SpanKind . CLIENT &&
59
- spanAttributes [ SemanticAttributes . HTTP_METHOD ] &&
59
+ spanAttributes [ SEMATTRS_HTTP_METHOD ] &&
60
60
( ! parentSpan || parentContext ?. isRemote )
61
61
) {
62
62
return { decision : SamplingDecision . NOT_RECORD , traceState } ;
0 commit comments