This directory contains examples demonstrating OpenTelemetry tracing and metrics in Mellea. For setup, exporters (including Jaeger), span attributes, and metrics, see Telemetry, Tracing, and Metrics.
| File | Description |
|---|---|
telemetry_example.py |
Demonstrates distributed tracing (application and backend traces). |
metrics_example.py |
Demonstrates token usage metrics collection. |
otel_genai_semconv_example.py |
Verifies OTel GenAI semantic convention attributes emitted on backend spans (gen_ai.provider.name, gen_ai.conversation.id, error.type). Designed for human verification against otelite. |
- Disabled (default): Near-zero overhead
- Enabled: Low overhead (~2-5%)
Traces not appearing in Jaeger:
- Check Jaeger is running:
docker ps | grep jaeger - Verify endpoint:
curl http://localhost:4317 - Check environment variables are set
- Enable console output to verify traces are created