NikiforovAll/pi-otel ? reverse-engineered prompt
Reverse engineered prompt
Build me a TypeScript package that adds OpenTelemetry tracing to the pi coding agent.
I want it to create a span tree for each turn, and include the full GenAI tracing fields for things like token usage, cost, model name, finish reasons, and tool calls. It should be easy to turn on with a pi install command, and it should work with local observability tools like Aspire out of the box, with support for the usual OTLP endpoint setup too.
Please make the configuration simple in the pi settings file, with sensible defaults, and let me enable or disable traces, metrics, and logs. I also want a safe content capture option so it can store metadata only when needed. If there are any setup details that depend on current docs or the latest OpenTelemetry conventions, look them up online and keep it aligned with the latest recommended format.
Are you gonna build this?
make sure you review the code using coderabbit