pi-otel
v0.1.0
Published
OpenTelemetry traces for pi-coding-agent — per-prompt span tree (interaction → llm_request, tool.<name>) exported via OTLP. Aspire-dashboard ready.
Maintainers
Readme
pi-otel
OpenTelemetry tracing for pi agent.
Full OTel GenAI semantic-convention coverage (gen_ai.*) for token usage, cost, model, finish reasons, and tool calls.
Install
pi install npm:pi-otelQuickstart
/otel start # spawn local Aspire dashboardBackend auto-detect: Aspire CLI first, then Docker / Podman. Install one:
- Aspire CLI
- Docker or Podman
Configuration
.pi/settings.json (project) or ~/.pi/agent/settings.json (global):
{
"otel": {
"enabled": true,
"endpoint": "http://localhost:4317",
"protocol": "grpc",
"headers": {},
"serviceName": "pi",
"captureContent": "metadata_only",
"sampleRatio": 1.0,
"signals": { "traces": true, "metrics": false, "logs": false }
}
}Key env var overrides: OTEL_EXPORTER_OTLP_ENDPOINT, PI_OTEL_METRICS=1, PI_OTEL_LOGS=1, PI_OTEL_DISABLED=1.
Full reference — settings, env vars, content capture modes, sampling, logs signal, and extensibility: nikiforovall.blog/pi-otel/configuration
