diff --git a/packages/instrumentation-anthropic/src/instrumentation.ts b/packages/instrumentation-anthropic/src/instrumentation.ts index efe113cf..b0fec525 100644 --- a/packages/instrumentation-anthropic/src/instrumentation.ts +++ b/packages/instrumentation-anthropic/src/instrumentation.ts @@ -234,7 +234,7 @@ export class AnthropicInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } @@ -290,7 +290,7 @@ export class AnthropicInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } } @@ -321,7 +321,7 @@ export class AnthropicInstrumentation extends InstrumentationBase { result.completion += chunk.completion; } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } } @@ -425,7 +425,7 @@ export class AnthropicInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } diff --git a/packages/instrumentation-azure/src/instrumentation.ts b/packages/instrumentation-azure/src/instrumentation.ts index 177ea53e..572f5320 100644 --- a/packages/instrumentation-azure/src/instrumentation.ts +++ b/packages/instrumentation-azure/src/instrumentation.ts @@ -218,7 +218,7 @@ export class AzureOpenAIInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } @@ -349,7 +349,7 @@ export class AzureOpenAIInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } diff --git a/packages/instrumentation-bedrock/src/instrumentation.ts b/packages/instrumentation-bedrock/src/instrumentation.ts index bd042918..b5565fc2 100644 --- a/packages/instrumentation-bedrock/src/instrumentation.ts +++ b/packages/instrumentation-bedrock/src/instrumentation.ts @@ -171,7 +171,7 @@ export class BedrockInstrumentation extends InstrumentationBase { }; } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } @@ -274,7 +274,7 @@ export class BedrockInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } diff --git a/packages/instrumentation-chromadb/src/instrumentation.ts b/packages/instrumentation-chromadb/src/instrumentation.ts index 8ca3f1f2..be86ef9e 100644 --- a/packages/instrumentation-chromadb/src/instrumentation.ts +++ b/packages/instrumentation-chromadb/src/instrumentation.ts @@ -201,7 +201,7 @@ export class ChromaDBInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } @@ -341,7 +341,7 @@ export class ChromaDBInstrumentation extends InstrumentationBase { }); } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } diff --git a/packages/instrumentation-cohere/src/instrumentation.ts b/packages/instrumentation-cohere/src/instrumentation.ts index c5836a9f..5a570a2b 100644 --- a/packages/instrumentation-cohere/src/instrumentation.ts +++ b/packages/instrumentation-cohere/src/instrumentation.ts @@ -267,7 +267,7 @@ export class CohereInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } @@ -388,7 +388,7 @@ export class CohereInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } } @@ -471,7 +471,7 @@ export class CohereInstrumentation extends InstrumentationBase { ); } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } } @@ -541,7 +541,7 @@ export class CohereInstrumentation extends InstrumentationBase { ); } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } } diff --git a/packages/instrumentation-langchain/src/utils.ts b/packages/instrumentation-langchain/src/utils.ts index 1ea3348a..0ed7122a 100644 --- a/packages/instrumentation-langchain/src/utils.ts +++ b/packages/instrumentation-langchain/src/utils.ts @@ -42,7 +42,7 @@ export function genericWrapper( ); } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } } @@ -77,7 +77,7 @@ export function genericWrapper( } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } finally { span.end(); diff --git a/packages/instrumentation-openai/src/instrumentation.ts b/packages/instrumentation-openai/src/instrumentation.ts index 89e30591..170dc505 100644 --- a/packages/instrumentation-openai/src/instrumentation.ts +++ b/packages/instrumentation-openai/src/instrumentation.ts @@ -318,7 +318,7 @@ export class OpenAIInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } @@ -472,7 +472,7 @@ export class OpenAIInstrumentation extends InstrumentationBase { result.choices[0].text += chunk.choices[0].text; } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } } @@ -500,7 +500,7 @@ export class OpenAIInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } @@ -650,7 +650,7 @@ export class OpenAIInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } @@ -714,7 +714,7 @@ export class OpenAIInstrumentation extends InstrumentationBase { span.addEvent("logprobs", { logprobs: JSON.stringify(result) }); } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } } @@ -729,7 +729,7 @@ export class OpenAIInstrumentation extends InstrumentationBase { encoding = encodingForModel(model as TiktokenModel); this._encodingCache.set(model, encoding); } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); return 0; } diff --git a/packages/instrumentation-pinecone/src/instrumentation.ts b/packages/instrumentation-pinecone/src/instrumentation.ts index 74c853cb..fe1e50ed 100644 --- a/packages/instrumentation-pinecone/src/instrumentation.ts +++ b/packages/instrumentation-pinecone/src/instrumentation.ts @@ -178,7 +178,7 @@ export class PineconeInstrumentation extends InstrumentationBase { JSON.stringify(options.filter ? options.filter : {}), ); } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } @@ -268,7 +268,7 @@ export class PineconeInstrumentation extends InstrumentationBase { ); } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } span.end(); diff --git a/packages/instrumentation-vertexai/src/aiplatform-instrumentation.ts b/packages/instrumentation-vertexai/src/aiplatform-instrumentation.ts index 3fcb5cb3..a625d840 100644 --- a/packages/instrumentation-vertexai/src/aiplatform-instrumentation.ts +++ b/packages/instrumentation-vertexai/src/aiplatform-instrumentation.ts @@ -216,7 +216,7 @@ export class AIPlatformInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } @@ -355,7 +355,7 @@ export class AIPlatformInstrumentation extends InstrumentationBase { } } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } diff --git a/packages/instrumentation-vertexai/src/vertexai-instrumentation.ts b/packages/instrumentation-vertexai/src/vertexai-instrumentation.ts index 3b118f79..a1f8c5ac 100644 --- a/packages/instrumentation-vertexai/src/vertexai-instrumentation.ts +++ b/packages/instrumentation-vertexai/src/vertexai-instrumentation.ts @@ -163,7 +163,7 @@ export class VertexAIInstrumentation extends InstrumentationBase { this._formatPartsData(params.contents[0].parts); } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } @@ -250,7 +250,7 @@ export class VertexAIInstrumentation extends InstrumentationBase { }); } } catch (e) { - this._diag.warn(e); + this._diag.debug(e); this._config.exceptionLogger?.(e); } diff --git a/packages/traceloop-sdk/src/lib/telemetry/telemetry.ts b/packages/traceloop-sdk/src/lib/telemetry/telemetry.ts index 67923273..14d95dc9 100644 --- a/packages/traceloop-sdk/src/lib/telemetry/telemetry.ts +++ b/packages/traceloop-sdk/src/lib/telemetry/telemetry.ts @@ -3,7 +3,6 @@ import * as fs from "fs"; import * as path from "path"; import { v4 as uuid } from "uuid"; import { PostHog } from "posthog-node"; -import * as Sentry from "@sentry/node"; import { version } from "../../../package.json"; export class Telemetry { @@ -32,10 +31,6 @@ export class Telemetry { this.posthog = new PostHog( "phc_JMTeAfG8OpaPsyHzSBtqquMvko1fmOHcW0gyqLCrF3t", ); - Sentry.init({ - dsn: "https://0cbbe354864172adc0fbd41621a7a541@o4505278734663680.ingest.us.sentry.io/4507114378166272", - defaultIntegrations: false, - }); } } @@ -85,7 +80,7 @@ export class Telemetry { public logException(error: Error) { if (this.telemetryEnabled) { - Sentry.captureException(error); + this.capture("error", { error: error.message, stack: error.stack || "" }); } } }