ptp-telemetry

Defines the append-only run ledger and OTLP span store contract for ptp pipeline telemetry.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/AlmogMaayan/ptp --skill ptp-telemetry-almogmaayan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ptp-telemetry
Source: https://github.com/AlmogMaayan/ptp/tree/main/skills/ptp-telemetry
Command: npx skills add https://github.com/AlmogMaayan/ptp --skill ptp-telemetry-almogmaayan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? The ptp pipeline runs across many agents and CLIs but emits no durable timing data, making it impossible to attribute work time to epics, commands, or agents. This Skill is the single source of truth for the telemetry contract: the per-epic append-only run ledger, the 26-column spans CSV schema, the loopback OTLP receiver, and the ledger-to-span join rules. ## Core Features & Use Cases - Run ledger contract: Defines the ledger record shape, run_id minting, append protocol, and gate ordering so every write point records runs identically. - Span layer: Specifies the OTLP receiver, the 26-column spans.csv schema, OTel attribute mapping, and tool_class bucketing for Claude Code and Codex spans. - Ledger join and attribution: Joins spans to ledger runs by session and time window, routing unmatched records to _unattributed/ without ever dropping data. - Use Case: Enable telemetry.mode, run ptp pipeline commands, then use the report and analyze subcommands to see aggregate work time, elapsed wall time, and per-tool breakdowns per epic. ## Quick Start Ask the AI to enable ptp telemetry by running the telemetry setup subcommand and then report timing for the current epic.

Frequently Asked Questions about ptp-telemetry

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable telemetry for ptp pipeline runs?▼

Set telemetry.mode to on in a ptp config layer and run the telemetry setup subcommand, which writes the eight OTEL environment keys to settings.local.json after confirmation. The auto-start preamble then launches the loopback receiver at the head of instrumented steps.

What data does the ptp telemetry store record?▼

It records an append-only run ledger per epic plus a spans.csv with 26 columns covering trace ids, span kind, tool name and class, model, timestamps, duration, tokens, and cost. Raw NDJSON entries keep three extra fields including the retained Bash command text.

Does ptp telemetry work with Codex CLI spans?▼

Yes, Codex spans are mapped through a dedicated table keyed on the persisted service_name codex_exec, with token counts available but cost unavailable. Routing to Codex requires positive trace-group evidence, and unattributed groups go to _unattributed/.

Why is my ptp telemetry store empty even though the gates pass?▼

The usual cause is missing exporter-selection keys: without OTEL_LOGS_EXPORTER and OTEL_TRACES_EXPORTER set to otlp, Claude Code emits nothing. Run the status subcommand, which reports exporter key drift and endpoint or credential mismatches without printing secret values.

Can telemetry writes fail or slow down a ptp command?▼

No. Every telemetry operation is fire-and-forget: errors are swallowed, writes are single appends, and the auto-start preamble is bounded to two 250 ms probes plus a 2-second readiness window. Telemetry is never a precondition and never alters a command's terminal state.