Skip to content

Commit

Permalink
chore: remove tracing for chat requests (Issue #415) (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Kezik authored Jan 4, 2024
1 parent a0c64d5 commit 0ee18c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/opentelemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ const sdk = new NodeSDK({
[SemanticResourceAttributes.SERVICE_VERSION]: pkg.version,
}),
),
instrumentations: [new HttpInstrumentation()],
instrumentations: [
new HttpInstrumentation({
ignoreOutgoingRequestHook: (request) =>
!!request.path?.match(
/^\/+openai\/deployments\/([-.@a-zA-Z0-9]+)\/(completions|chat\/completions|embeddings)/,
),
}),
],
spanProcessor,
});
sdk.start();

0 comments on commit 0ee18c7

Please sign in to comment.