Telemetry
Alexandria exports traces, metrics, and logs via OTLP HTTP (port 4318) when an endpoint is configured. Zero overhead when disabled.
Enable
alexandria config set otel.endpoint "http://localhost:4318"
Optional: change service name or sampling rate.
alexandria config set otel.service_name "my-alexandria"
alexandria config set otel.sample_rate "0.5" # sample 50% of traces
Check status:
alexandria telemetry status
Run the Collector
Download otelcol-contrib and run with the bundled template:
otelcol --config config/otelcol.yaml
The default config exports to stdout (debug mode). Uncomment the relevant exporter block in config/otelcol.yaml (in the source tree) for your backend:
- Jaeger —
otlp/jaeger - Grafana Tempo —
otlp/tempo - Prometheus —
prometheusremotewrite - Datadog —
datadog
Signals
| Signal | What's captured |
|---|---|
| Traces | One span per query, LLM completion, and tool invocation |
| Metrics | query.count, query.duration_ms, llm.duration_ms, tool.duration_ms, tool.cache_hits, tool.cache_misses |
| Logs | All info/warn/error events correlated with trace context |
All metrics carry a backend.name or tool.name attribute for filtering.