@@ -3,10 +3,16 @@ import { SpanKind } from '@opentelemetry/api';
33import { TraceFlags , context , trace } from '@opentelemetry/api' ;
44import type { ReadableSpan } from '@opentelemetry/sdk-trace-base' ;
55import { Span as SpanClass } from '@opentelemetry/sdk-trace-base' ;
6- import { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE , getClient , getCurrentScope , spanToJSON } from '@sentry/core' ;
6+ import {
7+ SEMANTIC_ATTRIBUTE_SENTRY_OP ,
8+ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ,
9+ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ,
10+ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ,
11+ getClient ,
12+ getCurrentScope ,
13+ } from '@sentry/core' ;
714import type { Event , PropagationContext , Scope } from '@sentry/types' ;
815
9- import { InternalSentrySemanticAttributes } from '../src/semanticAttributes' ;
1016import { startInactiveSpan , startSpan , startSpanManual } from '../src/trace' ;
1117import type { AbstractSpan } from '../src/types' ;
1218import { setPropagationContextOnContext } from '../src/utils/contextData' ;
@@ -220,15 +226,15 @@ describe('trace', () => {
220226 origin : 'auto.test.origin' ,
221227 metadata : { requestPath : 'test-path' } ,
222228 attributes : {
223- [ InternalSentrySemanticAttributes . SOURCE ] : 'task' ,
229+ [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'task' ,
224230 } ,
225231 } ,
226232 span => {
227233 expect ( span ) . toBeDefined ( ) ;
228234 expect ( getSpanAttributes ( span ) ) . toEqual ( {
229- [ InternalSentrySemanticAttributes . SOURCE ] : 'task' ,
230- [ InternalSentrySemanticAttributes . ORIGIN ] : 'auto.test.origin' ,
231- [ InternalSentrySemanticAttributes . OP ] : 'my-op' ,
235+ [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'task' ,
236+ [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.test.origin' ,
237+ [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : 'my-op' ,
232238 [ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ] : 1 ,
233239 } ) ;
234240
@@ -481,17 +487,17 @@ describe('trace', () => {
481487 op : 'my-op' ,
482488 origin : 'auto.test.origin' ,
483489 attributes : {
484- [ InternalSentrySemanticAttributes . SOURCE ] : 'task' ,
490+ [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'task' ,
485491 } ,
486492 metadata : { requestPath : 'test-path' } ,
487493 } ) ;
488494
489495 expect ( span2 ) . toBeDefined ( ) ;
490496 expect ( getSpanAttributes ( span2 ) ) . toEqual ( {
491497 [ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ] : 1 ,
492- [ InternalSentrySemanticAttributes . SOURCE ] : 'task' ,
493- [ InternalSentrySemanticAttributes . ORIGIN ] : 'auto.test.origin' ,
494- [ InternalSentrySemanticAttributes . OP ] : 'my-op' ,
498+ [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'task' ,
499+ [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.test.origin' ,
500+ [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : 'my-op' ,
495501 } ) ;
496502
497503 expect ( getSpanMetadata ( span2 ) ) . toEqual ( { requestPath : 'test-path' } ) ;
0 commit comments