- Notifications
You must be signed in to change notification settings - Fork845
Update OpenTelemetryChatClient to 1.34#6466
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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 semantic conventions to v1.34 and adds conversation-level tagging to the chat client.
- Introduce a new
Conversation.Idconstant for Gen AI telemetry. - Bump documentation references from v1.33 to v1.34.
- Instrument
OpenTelemetryChatClientto tagConversationIdon streaming responses.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Libraries/Microsoft.Extensions.AI/OpenTelemetryConsts.cs | AddedConversation.Id constant under Gen AI telemetry. |
| src/Libraries/Microsoft.Extensions.AI/Embeddings/OpenTelemetryEmbeddingGenerator.cs | Updated semantic conventions version to v1.34 in remarks. |
| src/Libraries/Microsoft.Extensions.AI/ChatCompletion/OpenTelemetryChatClient.cs | Updated spec version docs and added tagging ofConversationId on streaming responses. |
Comments suppressed due to low confidence (2)
src/Libraries/Microsoft.Extensions.AI/ChatCompletion/OpenTelemetryChatClient.cs:250
- Consider adding or updating unit/integration tests to verify that
ConversationIdis correctly added as a tag on activities, ensuring your new telemetry behaviour is covered.
if (options.ConversationId is string conversationId)src/Libraries/Microsoft.Extensions.AI/ChatCompletion/OpenTelemetryChatClient.cs:246
- For consistent telemetry, also apply the
ConversationIdtag in the non-streamingGetResponseAsyncoverride so both chat paths include conversation context.
public override async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAUh oh!
There was an error while loading.Please reload this page.
c01d681 intodotnet:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
cc:@lmolkova
Microsoft Reviewers:Open in CodeFlow