-
Notifications
You must be signed in to change notification settings - Fork 191
Update LLM SDK instrumentations for better otel semconv compliance #1580
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
base: main
Are you sure you want to change the base?
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
left a comment
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.
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( |
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.
Do you plan to also update this to be gen_ai.input.messages and gen_ai.output.messages
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.
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.
@brightsparc @dmontagu Started PR #1593 to port in the rest of the Semantic Conventions for Anthropic and OpenAI
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.