Skip to content

Commit 25a61d1

Browse files
committed
fix rebase issue
1 parent 3ccddaf commit 25a61d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/opentelemetry/src/sampler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { Client, SpanAttributes } from '@sentry/types';
99
import { logger } from '@sentry/utils';
1010
import { SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING, SENTRY_TRACE_STATE_URL } from './constants';
1111

12-
import { SEMATTRS_HTTP_METHOD } from '@opentelemetry/semantic-conventions';
12+
import { SEMATTRS_HTTP_METHOD, SEMATTRS_HTTP_URL } from '@opentelemetry/semantic-conventions';
1313
import { DEBUG_BUILD } from './debug-build';
1414
import { getPropagationContextFromSpan } from './propagator';
1515
import { getSamplingDecision } from './utils/getSamplingDecision';
@@ -43,7 +43,7 @@ export class SentrySampler implements Sampler {
4343
let traceState = parentContext?.traceState || new TraceState();
4444

4545
// 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];
4747
if (url && typeof url === 'string') {
4848
traceState = traceState.set(SENTRY_TRACE_STATE_URL, url);
4949
}
@@ -56,7 +56,7 @@ export class SentrySampler implements Sampler {
5656
// but we want to leave downstream sampling decisions up to the server
5757
if (
5858
spanKind === SpanKind.CLIENT &&
59-
spanAttributes[SemanticAttributes.HTTP_METHOD] &&
59+
spanAttributes[SEMATTRS_HTTP_METHOD] &&
6060
(!parentSpan || parentContext?.isRemote)
6161
) {
6262
return { decision: SamplingDecision.NOT_RECORD, traceState };

0 commit comments

Comments
 (0)