pi-otel

OpenTelemetry traces for pi-coding-agent — per-prompt span tree (interaction → llm_request, tool.<name>) exported via OTLP. Aspire-dashboard ready.

Packages

Package details

extension

Install pi-otel from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-otel
Package
pi-otel
Version
0.1.0
Published
May 16, 2026
Downloads
not available
Author
nikiforovall
License
Apache-2.0
Types
extension
Size
150.2 KB
Dependencies
8 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./dist/index.js"
  ],
  "image": "https://raw.githubusercontent.com/nikiforovall/pi-otel/master/assets/pi-otel-poster.png",
  "video": "https://raw.githubusercontent.com/NikiforovAll/pi-otel/master/assets/demo.mp4"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-otel

Docs

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-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