Developers can leverage OpenTelemetry's GenAI semantic conventions to effectively trace and monitor Large Language Model (LLM) calls, addressing challenges with cost and performance tracking across multiple providers. The article details how to instrument LLM interactions, emphasizing the importance of consistent span naming and accurate token counting, as different providers like OpenAI and Anthropic report token usage differently. By implementing custom wrappers and adhering to the developing OpenTelemetry specifications, developers can gain clearer insights into LLM operational costs and latency. AI
IMPACT Enables developers to better monitor and control LLM costs and performance in production environments.
RANK_REASON Article describes a technical implementation for monitoring and tracing LLM calls using an existing observability framework.
- Anthropic
- Claude Sonnet 4.5
- gen_ai.operation.name
- gen_ai.provider.name
- gen_ai.request.max_tokens
- gen_ai.request.model
- gen_ai.response.finish_reasons
- gen_ai.response.id
- gen_ai.response.model
- OpenTelemetry
- open-telemetry/semantic-conventions-genai
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →