@@ -33,11 +33,15 @@ test('Sends transaction with OTel tracer.startSpan despite pre-existing provider
3333 expect . arrayContaining ( [
3434 expect . objectContaining ( {
3535 description : 'test-otel-span' ,
36- op : 'otel.span' ,
3736 origin : 'manual' ,
3837 } ) ,
3938 ] ) ,
4039 ) ;
40+
41+ const otelSpan = transaction . spans ! . find ( ( s : any ) => s . description === 'test-otel-span' ) ;
42+ expect ( otelSpan ) . toBeDefined ( ) ;
43+ // INTERNAL (and other unmapped) kinds must not get a synthetic `otel.span` op
44+ expect ( otelSpan ! . op ) . toBeUndefined ( ) ;
4145} ) ;
4246
4347test ( 'Sends transaction with OTel tracer.startActiveSpan' , async ( { baseURL } ) => {
@@ -53,11 +57,14 @@ test('Sends transaction with OTel tracer.startActiveSpan', async ({ baseURL }) =
5357 expect . arrayContaining ( [
5458 expect . objectContaining ( {
5559 description : 'test-otel-active-span' ,
56- op : 'otel.span' ,
5760 origin : 'manual' ,
5861 } ) ,
5962 ] ) ,
6063 ) ;
64+
65+ const otelSpan = transaction . spans ! . find ( ( s : any ) => s . description === 'test-otel-active-span' ) ;
66+ expect ( otelSpan ) . toBeDefined ( ) ;
67+ expect ( otelSpan ! . op ) . toBeUndefined ( ) ;
6168} ) ;
6269
6370test ( 'OTel span appears as child of Sentry span (interop)' , async ( { baseURL } ) => {
@@ -77,7 +84,6 @@ test('OTel span appears as child of Sentry span (interop)', async ({ baseURL })
7784 } ) ,
7885 expect . objectContaining ( {
7986 description : 'otel-child' ,
80- op : 'otel.span' ,
8187 origin : 'manual' ,
8288 } ) ,
8389 ] ) ,
@@ -87,4 +93,5 @@ test('OTel span appears as child of Sentry span (interop)', async ({ baseURL })
8793 const sentrySpan = transaction . spans ! . find ( ( s : any ) => s . description === 'sentry-parent' ) ;
8894 const otelSpan = transaction . spans ! . find ( ( s : any ) => s . description === 'otel-child' ) ;
8995 expect ( otelSpan ! . parent_span_id ) . toBe ( sentrySpan ! . span_id ) ;
96+ expect ( otelSpan ! . op ) . toBeUndefined ( ) ;
9097} ) ;
0 commit comments