@@ -2,7 +2,7 @@ import * as sentryCore from '@sentry/core';
22import { Hub } from '@sentry/core' ;
33import { addExtensionMethods , Span , TRACEPARENT_REGEXP , Transaction } from '@sentry/tracing' ;
44import { TransactionContext } from '@sentry/types' ;
5- import { parseSemver } from '@sentry/utils' ;
5+ import { logger , parseSemver } from '@sentry/utils' ;
66import * as http from 'http' ;
77import * as https from 'https' ;
88import * as HttpsProxyAgent from 'https-proxy-agent' ;
@@ -188,6 +188,28 @@ describe('tracing', () => {
188188 expect ( transaction . metadata . propagations ) . toBe ( 2 ) ;
189189 } ) ;
190190
191+ it ( "doesn't attach when using otel instrumenter" , ( ) => {
192+ const loggerLogSpy = jest . spyOn ( logger , 'log' ) ;
193+
194+ const options = getDefaultNodeClientOptions ( {
195+ dsn : 'https://dogsarebadatkeepingsecrets@squirrelchasers.ingest.sentry.io/12312012' ,
196+ tracesSampleRate : 1.0 ,
197+ integrations : [ new HttpIntegration ( { tracing : true } ) ] ,
198+ release : '1.0.0' ,
199+ environment : 'production' ,
200+ instrumenter : 'otel' ,
201+ } ) ;
202+ const hub = new Hub ( new NodeClient ( options ) ) ;
203+
204+ const integration = new HttpIntegration ( ) ;
205+ integration . setupOnce (
206+ ( ) => { } ,
207+ ( ) => hub ,
208+ ) ;
209+
210+ expect ( loggerLogSpy ) . toBeCalledWith ( 'HTTP Integration is skipped because of instrumenter configuration.' ) ;
211+ } ) ;
212+
191213 describe ( 'tracePropagationTargets option' , ( ) => {
192214 beforeEach ( ( ) => {
193215 // hacky way of restoring monkey patched functions
0 commit comments