@@ -3,10 +3,17 @@ 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+ spanToJSON ,
14+ } from '@sentry/core' ;
715import type { Event , PropagationContext , Scope } from '@sentry/types' ;
816
9- import { InternalSentrySemanticAttributes } from '../src/semanticAttributes' ;
1017import { startInactiveSpan , startSpan , startSpanManual } from '../src/trace' ;
1118import type { AbstractSpan } from '../src/types' ;
1219import { setPropagationContextOnContext } from '../src/utils/contextData' ;
@@ -220,15 +227,15 @@ describe('trace', () => {
220227 origin : 'auto.test.origin' ,
221228 metadata : { requestPath : 'test-path' } ,
222229 attributes : {
223- [ InternalSentrySemanticAttributes . SOURCE ] : 'task' ,
230+ [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'task' ,
224231 } ,
225232 } ,
226233 span => {
227234 expect ( span ) . toBeDefined ( ) ;
228235 expect ( getSpanAttributes ( span ) ) . toEqual ( {
229- [ InternalSentrySemanticAttributes . SOURCE ] : 'task' ,
230- [ InternalSentrySemanticAttributes . ORIGIN ] : 'auto.test.origin' ,
231- [ InternalSentrySemanticAttributes . OP ] : 'my-op' ,
236+ [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'task' ,
237+ [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.test.origin' ,
238+ [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : 'my-op' ,
232239 [ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ] : 1 ,
233240 } ) ;
234241
@@ -481,17 +488,17 @@ describe('trace', () => {
481488 op : 'my-op' ,
482489 origin : 'auto.test.origin' ,
483490 attributes : {
484- [ InternalSentrySemanticAttributes . SOURCE ] : 'task' ,
491+ [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'task' ,
485492 } ,
486493 metadata : { requestPath : 'test-path' } ,
487494 } ) ;
488495
489496 expect ( span2 ) . toBeDefined ( ) ;
490497 expect ( getSpanAttributes ( span2 ) ) . toEqual ( {
491498 [ SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ] : 1 ,
492- [ InternalSentrySemanticAttributes . SOURCE ] : 'task' ,
493- [ InternalSentrySemanticAttributes . ORIGIN ] : 'auto.test.origin' ,
494- [ InternalSentrySemanticAttributes . OP ] : 'my-op' ,
499+ [ SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ] : 'task' ,
500+ [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.test.origin' ,
501+ [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : 'my-op' ,
495502 } ) ;
496503
497504 expect ( getSpanMetadata ( span2 ) ) . toEqual ( { requestPath : 'test-path' } ) ;
0 commit comments