Skip to content
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

Implement MessageAttributes instead of SpanAttributes for LLM_COMPLETIONS and LLM_CONTENT_COMPLETION_CHUNK #887

Open
Dwij1704 opened this issue Mar 25, 2025 · 0 comments

Comments

@Dwij1704
Copy link
Contributor

We end up creating a hybrid semconv + string formatting in the instrumentation if we use it, refer https://github.com/AgentOps-AI/agentops/blob/main/third_party/opentelemetry/instrumentation/openai/shared/chat_wrappers.py#L421 , we end up formatting string for span attributes

Instead refer to https://github.com/AgentOps-AI/agentops/tree/c1a40153a08ca2ee049a9229f5df15f91b3b6dfd/agentops/instrumentation/openai_agents/attributes and and https://github.com/AgentOps-AI/agentops/blob/c1a40153a08ca2ee049a9229f5df15f91b3b6dfd/agentops/semconv/message.py to streamline the process of formatting the string for span attributes.

Implement it in Langchain handler and OpenAi instrumentor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant