@@ -13,8 +13,7 @@ import type { Event, EventHint } from '@sentry/types';
1313import type { Scope } from '@sentry/types' ;
1414
1515import { setOpenTelemetryContextAsyncContextStrategy } from '@sentry/opentelemetry' ;
16- import { NodeClient } from '../../src/sdk/client' ;
17- import { initOtel } from '../../src/sdk/initOtel' ;
16+ import { NodeClient , initOpenTelemetry } from '../../src' ;
1817import { getDefaultNodeClientOptions } from '../helpers/getDefaultNodeClientOptions' ;
1918import { cleanupOtel } from '../helpers/mockSdkInit' ;
2019
@@ -79,7 +78,7 @@ describe('NodeClient', () => {
7978 const client = new NodeClient ( options ) ;
8079 setCurrentClient ( client ) ;
8180 client . init ( ) ;
82- initOtel ( ) ;
81+ initOpenTelemetry ( client ) ;
8382
8483 withIsolationScope ( isolationScope => {
8584 isolationScope . setRequestSession ( { status : 'ok' } ) ;
@@ -96,7 +95,7 @@ describe('NodeClient', () => {
9695 const client = new NodeClient ( options ) ;
9796 setCurrentClient ( client ) ;
9897 client . init ( ) ;
99- initOtel ( ) ;
98+ initOpenTelemetry ( client ) ;
10099
101100 // It is required to initialise SessionFlusher to capture Session Aggregates (it is usually initialised
102101 // by the`requestHandler`)
@@ -117,7 +116,7 @@ describe('NodeClient', () => {
117116 const client = new NodeClient ( options ) ;
118117 setCurrentClient ( client ) ;
119118 client . init ( ) ;
120- initOtel ( ) ;
119+ initOpenTelemetry ( client ) ;
121120
122121 // It is required to initialise SessionFlusher to capture Session Aggregates (it is usually initialised
123122 // by the`requestHandler`)
@@ -138,7 +137,7 @@ describe('NodeClient', () => {
138137 const client = new NodeClient ( options ) ;
139138 setCurrentClient ( client ) ;
140139 client . init ( ) ;
141- initOtel ( ) ;
140+ initOpenTelemetry ( client ) ;
142141
143142 // It is required to initialise SessionFlusher to capture Session Aggregates (it is usually initialised
144143 // by the`requestHandler`)
@@ -159,7 +158,7 @@ describe('NodeClient', () => {
159158 const client = new NodeClient ( options ) ;
160159 setCurrentClient ( client ) ;
161160 client . init ( ) ;
162- initOtel ( ) ;
161+ initOpenTelemetry ( client ) ;
163162
164163 // It is required to initialise SessionFlusher to capture Session Aggregates (it is usually initialised
165164 // by the`requestHandler`)
@@ -187,7 +186,7 @@ describe('NodeClient', () => {
187186 const client = new NodeClient ( options ) ;
188187 setCurrentClient ( client ) ;
189188 client . init ( ) ;
190- initOtel ( ) ;
189+ initOpenTelemetry ( client ) ;
191190
192191 // It is required to initialise SessionFlusher to capture Session Aggregates (it is usually initialised
193192 // by the`requestHandler`)
@@ -223,7 +222,7 @@ describe('NodeClient', () => {
223222 const client = new NodeClient ( options ) ;
224223 setCurrentClient ( client ) ;
225224 client . init ( ) ;
226- initOtel ( ) ;
225+ initOpenTelemetry ( client ) ;
227226
228227 // It is required to initialise SessionFlusher to capture Session Aggregates (it is usually initialised
229228 // by the`requestHandler`)
@@ -244,7 +243,7 @@ describe('NodeClient', () => {
244243 const client = new NodeClient ( options ) ;
245244 setCurrentClient ( client ) ;
246245 client . init ( ) ;
247- initOtel ( ) ;
246+ initOpenTelemetry ( client ) ;
248247
249248 // It is required to initialise SessionFlusher to capture Session Aggregates (it is usually initialised
250249 // by the`requestHandler`)
@@ -263,7 +262,7 @@ describe('NodeClient', () => {
263262 const client = new NodeClient ( options ) ;
264263 setCurrentClient ( client ) ;
265264 client . init ( ) ;
266- initOtel ( ) ;
265+ initOpenTelemetry ( client ) ;
267266
268267 // It is required to initialise SessionFlusher to capture Session Aggregates (it is usually initialised
269268 // by the`requestHandler`)
@@ -284,7 +283,7 @@ describe('NodeClient', () => {
284283 const client = new NodeClient ( options ) ;
285284 setCurrentClient ( client ) ;
286285 client . init ( ) ;
287- initOtel ( ) ;
286+ initOpenTelemetry ( client ) ;
288287
289288 withIsolationScope ( isolationScope => {
290289 isolationScope . setRequestSession ( { status : 'ok' } ) ;
0 commit comments