Update LLM SDK instrumentations for better otel semconv compliance#1580
Closed
Update LLM SDK instrumentations for better otel semconv compliance#1580
Conversation
Deploying logfire-docs with
|
| Latest commit: |
0d3ae75
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://07edc372.logfire-docs.pages.dev |
| Branch Preview URL: | https://update-llm-instrumentation-s.logfire-docs.pages.dev |
|
following, it would be great to get this in main! I'm looking forward to better standardization with OTEL |
brightsparc
reviewed
Dec 19, 2025
Contributor
brightsparc
left a comment
There was a problem hiding this comment.
Great I can see that antropic and openai chat completions are using new format, but the openai responses endpoint seems to be using the previous events schema.
| OPERATION_NAME: 'chat', | ||
| REQUEST_MODEL: json_data.get('model'), | ||
| 'request_data': {'model': json_data.get('model'), 'stream': stream}, | ||
| 'events': inputs_to_events( |
Contributor
There was a problem hiding this comment.
Do you plan to also update this to be gen_ai.input.messages and gen_ai.output.messages
Contributor
Contributor
There was a problem hiding this comment.
@brightsparc @dmontagu Started PR #1593 to port in the rest of the Semantic Conventions for Anthropic and OpenAI
10 tasks
Contributor
Author
|
Closing in favor of #1666 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested recently in the context of the openai instrumentation not following semantic conventions. I'll also open a PR on pydantic-ai to reflect updates to the semantic conventions that have happened since the last modification there.