Skip to content

Commit

Permalink
fix(sdk): manual instrumentation in all modules (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirga authored Mar 26, 2024
1 parent eaaa3ef commit e5784a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/traceloop-sdk/src/lib/tracing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export const manuallyInitInstrumentations = (
} = require("@traceloop/instrumentation-pinecone");
const instrumentation = new PineconeInstrumentation();
instrumentations.push(instrumentation as Instrumentation);
instrumentation.manuallyInstrument(instrumentModules.pinecone);
}

if (instrumentModules?.google_vertexai) {
Expand All @@ -169,6 +170,7 @@ export const manuallyInitInstrumentations = (
const instrumentation = new VertexAIInstrumentation();
instrumentations.push(instrumentation);
vertexaiInstrumentation = instrumentation;
instrumentation.manuallyInstrument(instrumentModules.google_vertexai);
}

if (instrumentModules?.google_aiplatform) {
Expand All @@ -178,6 +180,7 @@ export const manuallyInitInstrumentations = (
const instrumentation = new AIPlatformInstrumentation();
instrumentations.push(instrumentation as Instrumentation);
aiplatformInstrumentation = instrumentation;
instrumentation.manuallyInstrument(instrumentModules.google_aiplatform);
}

if (instrumentModules?.bedrock) {
Expand All @@ -187,6 +190,7 @@ export const manuallyInitInstrumentations = (
const instrumentation = new BedrockInstrumentation();
instrumentations.push(instrumentation as Instrumentation);
bedrockInstrumentation = instrumentation;
instrumentation.manuallyInstrument(instrumentModules.bedrock);
}

if (instrumentModules?.azureOpenAI) {
Expand All @@ -196,6 +200,7 @@ export const manuallyInitInstrumentations = (
const instrumentation = new AzureOpenAIInstrumentation();
instrumentations.push(instrumentation as Instrumentation);
azureOpenAIInstrumentation = instrumentation;
instrumentation.manuallyInstrument(instrumentModules.azureOpenAI);
}

if (instrumentModules?.cohere) {
Expand All @@ -205,6 +210,7 @@ export const manuallyInitInstrumentations = (
const instrumentation = new CohereInstrumentation();
instrumentations.push(instrumentation as Instrumentation);
cohereInstrumentation = instrumentation;
instrumentation.manuallyInstrument(instrumentModules.cohere);
}
};

Expand Down

0 comments on commit e5784a4

Please sign in to comment.