@damngamerz/pi-otel
Privacy-conscious OpenTelemetry traces, metrics, and optional LLM evaluation for Pi
Package details
Install @damngamerz/pi-otel from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@damngamerz/pi-otel- Package
@damngamerz/pi-otel- Version
0.1.2- Published
- Jul 22, 2026
- Downloads
- 298/mo · 298/wk
- Author
- damngamerz
- License
- MIT
- Types
- extension
- Size
- 171.3 KB
- Dependencies
- 7 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./dist/index.js"
],
"image": "https://pi.dev/packages/@damngamerz/pi-otel"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@damngamerz/pi-otel
Privacy-conscious OpenTelemetry traces, metrics, and optional response evaluation for the Pi coding agent.
- GenAI semantic traces for agent, LLM, and tool activity
- token, cost, latency, error, and tool metrics
- optional manual, sampled, or always-on LLM evaluation
- correlated
gen_ai.evaluation.resultevents - pinned local Grafana LGTM example
- remote evaluation off by default
Privacy first
Baseline telemetry never contains prompts, responses, thinking, provider payloads, tool arguments/results, shell commands, paths, cwd, usernames, hostnames, or email addresses.
Remote evaluation changes that boundary by sending the latest user request and assistant text to the configured judge model. It is disabled by default, content-limited, deduplicated, and blocked when likely credentials or private keys are detected. See the privacy model.
Quick preview

The example telemetry Grafana stack ships with a pre-built dashboard showing real-time telemetry.
Install
pi install npm:@damngamerz/pi-otel
For a pinned install:
pi install npm:@damngamerz/pi-otel@0.1.1
Local Grafana quick start
cd examples/grafana-lgtm
docker compose up -d
Open http://127.0.0.1:33000/d/damngamerz-pi-otel/atdamngamerz-pi-otel.
The extension exports OTLP/HTTP to http://127.0.0.1:4318 by default.
Configure
Add piOtel to ~/.pi/agent/settings.json or a trusted project's .pi/settings.json:
{
"piOtel": {
"enabled": true,
"endpoint": "http://127.0.0.1:4318",
"evaluation": {
"mode": "off",
"provider": "openai-codex",
"model": "gpt-5.4-mini"
}
}
}
Evaluation modes:
off— no remote evaluation; defaultmanual— evaluate through/otel-eval-lastsample— deterministically evaluate a configured fractionalways— evaluate every settled response
See configuration for every setting and environment override.
Commands
/otel-status
/otel-flush
/otel-eval-last
Telemetry
Primary metrics include:
gen_ai.client.operation.durationgen_ai.client.token.usagegen_ai.client.tool_calls_per_operationgen_ai.client.tool.callsgen_ai.evaluation.scorepi.agent.promptspi.agent.turnspi.agent.tool.durationpi.agent.tool.errorspi.agent.session.durationpi.agent.costpi.agent.time_to_first_token
See metrics for the full reference.
Security
Pi packages execute with the user's full permissions. Review extension source before installation and pin versions in sensitive environments.
This package:
- has no install or postinstall scripts
- does not start Docker or modify system services
- rejects remote OTLP endpoints unless explicitly enabled and protected by HTTPS
- rejects endpoint URLs containing credentials
- keeps baseline telemetry content-free
Report vulnerabilities privately according to SECURITY.md.
Development
npm install --ignore-scripts
npm run check
npm pack --dry-run
Acknowledgements
This project gratefully credits Oleksii Nikiforov (NikiforovAll) and the original NikiforovAll/pi-otel project. Its work directly inspired this package, and the Grafana dashboard is adapted from that project under Apache-2.0.
See ACKNOWLEDGEMENTS.md, NOTICE, and LICENSES/Apache-2.0.txt.
License
Original package code is MIT licensed. The adapted Grafana dashboard remains subject to its Apache-2.0 attribution and notice.