File tree 11 files changed +29
-34
lines changed
instrumentation-anthropic/src
instrumentation-azure/src
instrumentation-bedrock/src
instrumentation-chromadb/src
instrumentation-cohere/src
instrumentation-langchain/src
instrumentation-openai/src
instrumentation-pinecone/src
instrumentation-vertexai/src
traceloop-sdk/src/lib/telemetry
11 files changed +29
-34
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ export class AnthropicInstrumentation extends InstrumentationBase<any> {
234
234
}
235
235
}
236
236
} catch ( e ) {
237
- this . _diag . warn ( e ) ;
237
+ this . _diag . debug ( e ) ;
238
238
this . _config . exceptionLogger ?.( e ) ;
239
239
}
240
240
@@ -290,7 +290,7 @@ export class AnthropicInstrumentation extends InstrumentationBase<any> {
290
290
}
291
291
}
292
292
} catch ( e ) {
293
- this . _diag . warn ( e ) ;
293
+ this . _diag . debug ( e ) ;
294
294
this . _config . exceptionLogger ?.( e ) ;
295
295
}
296
296
}
@@ -321,7 +321,7 @@ export class AnthropicInstrumentation extends InstrumentationBase<any> {
321
321
result . completion += chunk . completion ;
322
322
}
323
323
} catch ( e ) {
324
- this . _diag . warn ( e ) ;
324
+ this . _diag . debug ( e ) ;
325
325
this . _config . exceptionLogger ?.( e ) ;
326
326
}
327
327
}
@@ -425,7 +425,7 @@ export class AnthropicInstrumentation extends InstrumentationBase<any> {
425
425
}
426
426
}
427
427
} catch ( e ) {
428
- this . _diag . warn ( e ) ;
428
+ this . _diag . debug ( e ) ;
429
429
this . _config . exceptionLogger ?.( e ) ;
430
430
}
431
431
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ export class AzureOpenAIInstrumentation extends InstrumentationBase<any> {
218
218
}
219
219
}
220
220
} catch ( e ) {
221
- this . _diag . warn ( e ) ;
221
+ this . _diag . debug ( e ) ;
222
222
this . _config . exceptionLogger ?.( e ) ;
223
223
}
224
224
@@ -349,7 +349,7 @@ export class AzureOpenAIInstrumentation extends InstrumentationBase<any> {
349
349
}
350
350
}
351
351
} catch ( e ) {
352
- this . _diag . warn ( e ) ;
352
+ this . _diag . debug ( e ) ;
353
353
this . _config . exceptionLogger ?.( e ) ;
354
354
}
355
355
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ export class BedrockInstrumentation extends InstrumentationBase<any> {
171
171
} ;
172
172
}
173
173
} catch ( e ) {
174
- this . _diag . warn ( e ) ;
174
+ this . _diag . debug ( e ) ;
175
175
this . _config . exceptionLogger ?.( e ) ;
176
176
}
177
177
@@ -274,7 +274,7 @@ export class BedrockInstrumentation extends InstrumentationBase<any> {
274
274
}
275
275
}
276
276
} catch ( e ) {
277
- this . _diag . warn ( e ) ;
277
+ this . _diag . debug ( e ) ;
278
278
this . _config . exceptionLogger ?.( e ) ;
279
279
}
280
280
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ export class ChromaDBInstrumentation extends InstrumentationBase<any> {
201
201
}
202
202
}
203
203
} catch ( e ) {
204
- this . _diag . warn ( e ) ;
204
+ this . _diag . debug ( e ) ;
205
205
this . _config . exceptionLogger ?.( e ) ;
206
206
}
207
207
@@ -341,7 +341,7 @@ export class ChromaDBInstrumentation extends InstrumentationBase<any> {
341
341
} ) ;
342
342
}
343
343
} catch ( e ) {
344
- this . _diag . warn ( e ) ;
344
+ this . _diag . debug ( e ) ;
345
345
this . _config . exceptionLogger ?.( e ) ;
346
346
}
347
347
Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ export class CohereInstrumentation extends InstrumentationBase<any> {
267
267
}
268
268
}
269
269
} catch ( e ) {
270
- this . _diag . warn ( e ) ;
270
+ this . _diag . debug ( e ) ;
271
271
this . _config . exceptionLogger ?.( e ) ;
272
272
}
273
273
@@ -388,7 +388,7 @@ export class CohereInstrumentation extends InstrumentationBase<any> {
388
388
}
389
389
}
390
390
} catch ( e ) {
391
- this . _diag . warn ( e ) ;
391
+ this . _diag . debug ( e ) ;
392
392
this . _config . exceptionLogger ?.( e ) ;
393
393
}
394
394
}
@@ -471,7 +471,7 @@ export class CohereInstrumentation extends InstrumentationBase<any> {
471
471
) ;
472
472
}
473
473
} catch ( e ) {
474
- this . _diag . warn ( e ) ;
474
+ this . _diag . debug ( e ) ;
475
475
this . _config . exceptionLogger ?.( e ) ;
476
476
}
477
477
}
@@ -541,7 +541,7 @@ export class CohereInstrumentation extends InstrumentationBase<any> {
541
541
) ;
542
542
}
543
543
} catch ( e ) {
544
- this . _diag . warn ( e ) ;
544
+ this . _diag . debug ( e ) ;
545
545
this . _config . exceptionLogger ?.( e ) ;
546
546
}
547
547
}
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export function genericWrapper(
42
42
) ;
43
43
}
44
44
} catch ( e ) {
45
- this . _diag . warn ( e ) ;
45
+ this . _diag . debug ( e ) ;
46
46
this . _config . exceptionLogger ?.( e ) ;
47
47
}
48
48
}
@@ -77,7 +77,7 @@ export function genericWrapper(
77
77
}
78
78
}
79
79
} catch ( e ) {
80
- this . _diag . warn ( e ) ;
80
+ this . _diag . debug ( e ) ;
81
81
this . _config . exceptionLogger ?.( e ) ;
82
82
} finally {
83
83
span . end ( ) ;
Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<any> {
318
318
}
319
319
}
320
320
} catch ( e ) {
321
- this . _diag . warn ( e ) ;
321
+ this . _diag . debug ( e ) ;
322
322
this . _config . exceptionLogger ?.( e ) ;
323
323
}
324
324
@@ -472,7 +472,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<any> {
472
472
result . choices [ 0 ] . text += chunk . choices [ 0 ] . text ;
473
473
}
474
474
} catch ( e ) {
475
- this . _diag . warn ( e ) ;
475
+ this . _diag . debug ( e ) ;
476
476
this . _config . exceptionLogger ?.( e ) ;
477
477
}
478
478
}
@@ -500,7 +500,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<any> {
500
500
}
501
501
}
502
502
} catch ( e ) {
503
- this . _diag . warn ( e ) ;
503
+ this . _diag . debug ( e ) ;
504
504
this . _config . exceptionLogger ?.( e ) ;
505
505
}
506
506
@@ -650,7 +650,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<any> {
650
650
}
651
651
}
652
652
} catch ( e ) {
653
- this . _diag . warn ( e ) ;
653
+ this . _diag . debug ( e ) ;
654
654
this . _config . exceptionLogger ?.( e ) ;
655
655
}
656
656
@@ -714,7 +714,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<any> {
714
714
715
715
span . addEvent ( "logprobs" , { logprobs : JSON . stringify ( result ) } ) ;
716
716
} catch ( e ) {
717
- this . _diag . warn ( e ) ;
717
+ this . _diag . debug ( e ) ;
718
718
this . _config . exceptionLogger ?.( e ) ;
719
719
}
720
720
}
@@ -729,7 +729,7 @@ export class OpenAIInstrumentation extends InstrumentationBase<any> {
729
729
encoding = encodingForModel ( model as TiktokenModel ) ;
730
730
this . _encodingCache . set ( model , encoding ) ;
731
731
} catch ( e ) {
732
- this . _diag . warn ( e ) ;
732
+ this . _diag . debug ( e ) ;
733
733
this . _config . exceptionLogger ?.( e ) ;
734
734
return 0 ;
735
735
}
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ export class PineconeInstrumentation extends InstrumentationBase<any> {
178
178
JSON . stringify ( options . filter ? options . filter : { } ) ,
179
179
) ;
180
180
} catch ( e ) {
181
- this . _diag . warn ( e ) ;
181
+ this . _diag . debug ( e ) ;
182
182
this . _config . exceptionLogger ?.( e ) ;
183
183
}
184
184
@@ -268,7 +268,7 @@ export class PineconeInstrumentation extends InstrumentationBase<any> {
268
268
) ;
269
269
}
270
270
} catch ( e ) {
271
- this . _diag . warn ( e ) ;
271
+ this . _diag . debug ( e ) ;
272
272
this . _config . exceptionLogger ?.( e ) ;
273
273
}
274
274
span . end ( ) ;
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ export class AIPlatformInstrumentation extends InstrumentationBase<any> {
216
216
}
217
217
}
218
218
} catch ( e ) {
219
- this . _diag . warn ( e ) ;
219
+ this . _diag . debug ( e ) ;
220
220
this . _config . exceptionLogger ?.( e ) ;
221
221
}
222
222
@@ -355,7 +355,7 @@ export class AIPlatformInstrumentation extends InstrumentationBase<any> {
355
355
}
356
356
}
357
357
} catch ( e ) {
358
- this . _diag . warn ( e ) ;
358
+ this . _diag . debug ( e ) ;
359
359
this . _config . exceptionLogger ?.( e ) ;
360
360
}
361
361
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ export class VertexAIInstrumentation extends InstrumentationBase<any> {
163
163
this . _formatPartsData ( params . contents [ 0 ] . parts ) ;
164
164
}
165
165
} catch ( e ) {
166
- this . _diag . warn ( e ) ;
166
+ this . _diag . debug ( e ) ;
167
167
this . _config . exceptionLogger ?.( e ) ;
168
168
}
169
169
@@ -250,7 +250,7 @@ export class VertexAIInstrumentation extends InstrumentationBase<any> {
250
250
} ) ;
251
251
}
252
252
} catch ( e ) {
253
- this . _diag . warn ( e ) ;
253
+ this . _diag . debug ( e ) ;
254
254
this . _config . exceptionLogger ?.( e ) ;
255
255
}
256
256
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import * as fs from "fs";
3
3
import * as path from "path" ;
4
4
import { v4 as uuid } from "uuid" ;
5
5
import { PostHog } from "posthog-node" ;
6
- import * as Sentry from "@sentry/node" ;
7
6
import { version } from "../../../package.json" ;
8
7
9
8
export class Telemetry {
@@ -32,10 +31,6 @@ export class Telemetry {
32
31
this . posthog = new PostHog (
33
32
"phc_JMTeAfG8OpaPsyHzSBtqquMvko1fmOHcW0gyqLCrF3t" ,
34
33
) ;
35
- Sentry . init ( {
36
- dsn : "https://0cbbe354864172adc0fbd41621a7a541@o4505278734663680.ingest.us.sentry.io/4507114378166272" ,
37
- defaultIntegrations : false ,
38
- } ) ;
39
34
}
40
35
}
41
36
@@ -85,7 +80,7 @@ export class Telemetry {
85
80
86
81
public logException ( error : Error ) {
87
82
if ( this . telemetryEnabled ) {
88
- Sentry . captureException ( error ) ;
83
+ this . capture ( " error" , { error : error . message , stack : error . stack || "" } ) ;
89
84
}
90
85
}
91
86
}
You can’t perform that action at this time.
0 commit comments