pi-otel

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

pi-otel

npm version npm downloads Docs

OpenTelemetry tracing for pi agent.

Full OTel GenAI semantic-convention coverage (gen_ai.*) for token usage, cost, model, finish reasons, and tool calls.

Aspire dashboard
Grafana LGTM

Install

pi install npm:pi-otel

Quickstart

/otel start         # spawn local Aspire dashboard

Backend 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