-
Notifications
You must be signed in to change notification settings - Fork 839
Update genai otel implementation with recent additions #6829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the OpenTelemetry implementation for generative AI to align with recent additions to the OpenTelemetry semantic conventions. The changes include updating attribute names, adding support for tool call tracking with arguments and results, and introducing tool definitions telemetry.
- Updates attribute names to match the latest semantic conventions (e.g.,
gen_ai.request.embedding.dimensions
→gen_ai.embeddings.dimension.count
) - Adds support for tracking tool call arguments and results in telemetry when sensitive data is enabled
- Introduces tool definitions tracking for chat completion requests
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
OpenTelemetryConsts.cs | Updates constant names and adds new attributes for tool calls and embeddings |
OpenTelemetryEmbeddingGenerator.cs | Updates to use new embedding dimension attribute name |
OpenTelemetryChatClient.cs | Adds tool definitions tracking and updates operation name constants |
OpenTelemetryImageGenerator.cs | Updates operation name constants for consistency |
FunctionInvokingChatClient.cs | Adds tool call arguments and results tracking with proper sensitive data handling |
Test files | Updates tests to verify new telemetry attributes and adds test coverage for tool tracking |
AIFunctionDeclaration.cs | Minor documentation update for JSON schema example |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
open-telemetry/semantic-conventions#2362
open-telemetry/semantic-conventions#2702
gen_ai.embeddings.dimension.count
gen_ai.tool.call.arguments
gen_ai.tool.call.result
gen_ai.tool.definitions
Microsoft Reviewers: Open in CodeFlow