@@ -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 } 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 { 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
@@ -376,17 +382,17 @@ describe('trace', () => {
376382 op : 'my-op' ,
377383 origin : 'auto.test.origin' ,
378384 attributes : {
379- [ InternalSentrySemanticAttributes . SOURCE ] : 'task' ,
385+ [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'task' ,
380386 } ,
381387 metadata : { requestPath : 'test-path' } ,
382388 } ) ;
383389
384390 expect ( span2 ) . toBeDefined ( ) ;
385391 expect ( getSpanAttributes ( span2 ) ) . toEqual ( {
386392 [ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ] : 1 ,
387- [ InternalSentrySemanticAttributes . SOURCE ] : 'task' ,
388- [ InternalSentrySemanticAttributes . ORIGIN ] : 'auto.test.origin' ,
389- [ InternalSentrySemanticAttributes . OP ] : 'my-op' ,
393+ [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'task' ,
394+ [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.test.origin' ,
395+ [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : 'my-op' ,
390396 } ) ;
391397
392398 expect ( getSpanMetadata ( span2 ) ) . toEqual ( { requestPath : 'test-path' } ) ;
0 commit comments