# Opentelemetry LLM

> OpenTelemetry instrumentation for LLM applications with distributed tracing

- Skill: `a5c-ai/opentelemetry-llm` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add a5c-ai/opentelemetry-llm`
- Raw SKILL.md: https://api.skillmd.com/api/skills/a5c-ai/opentelemetry-llm/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: a5c-ai (https://skillmd.com/u/a5c-ai)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/a5c-ai/opentelemetry-llm

---


# OpenTelemetry LLM Skill

## Capabilities

- Configure OpenTelemetry SDK for LLM apps
- Implement LLM-specific instrumentation
- Set up trace exporters (Jaeger, OTLP)
- Design semantic conventions for LLM
- Configure span attributes for AI workloads
- Implement context propagation

## Target Processes

- llm-observability-monitoring
- agent-deployment-pipeline

## Implementation Details

### Core Components

1. **TracerProvider**: SDK configuration
2. **SpanProcessor**: Batch/simple processors
3. **Exporters**: Jaeger, OTLP, Console
4. **Instrumentation**: Auto and manual

### LLM Semantic Conventions

- gen_ai.system (OpenAI, Anthropic)
- gen_ai.request.model
- gen_ai.request.max_tokens
- gen_ai.response.finish_reason
- gen_ai.usage.prompt_tokens

### Configuration Options

- Exporter selection
- Sampling strategies
- Resource attributes
- Span limits
- Context propagation

### Best Practices

- Consistent attribute naming
- Appropriate sampling
- Error handling traces
- Propagate context across services

### Dependencies

- opentelemetry-sdk
- opentelemetry-exporter-*
- openinference (optional)

