ptp-telemetry-export

Re-derives telemetry CSV files from raw NDJSON span records via a global deterministic export.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Recorded ptp telemetry lives in an append-only raw NDJSON store, while the CSV span views derived from it can fall behind after attribution changes or a crash. This Skill reconciles the derived CSVs against the raw store with one global, deterministic re-derivation, without ever touching the raw data. ## Core Features & Use Cases - Global re-derivation: Reads every epic's raw NDJSON and ledger files plus the shared _unattributed store, then rewrites all spans.csv outputs as a complete partition judged by where each record now resolves. - Deterministic, crash-safe output: Orders rows by a total ordering (start_ts, span_id, trace_id, serialized row) and publishes each CSV via a temporary file and single atomic rename. - Live-receiver safety: Refuses to run while a ptp telemetry receiver for the store is live, re-probing after staging and before any rename, and never stops the receiver itself. - Use Case: After a crash left spans.csv behind the raw store, run the export to rebuild every CSV from the raw records, then relay the single JSON result (exported, refused, aborted, noop, or failed). ## Quick Start Ask the assistant to run the ptp telemetry export for this repository to rebuild all span CSVs from the raw telemetry store.

Frequently Asked Questions about ptp-telemetry-export

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

FAQPage Schema
How do I export ptp telemetry to CSV?▼

Run /ptp:telemetry export or /ptp:telemetry-export with no flags or arguments. It performs a global re-derivation of every epic's spans.csv plus _unattributed/spans.csv from the raw NDJSON stores and prints one JSON result object.

Can I export telemetry for only one epic or a subset of records?▼

No. Export takes no flag, argument, or selector; every invocation is a global re-derivation. A scoped export would break the complete partition because the shared _unattributed CSV depends on reading every epic's raw store and ledger.

Why does telemetry export refuse to run?▼

Export refuses non-fatally when a live ptp receiver for the same telemetry store answers its identity probe, since concurrent appends could be lost from the CSV. Stop the receiver with /ptp:telemetry stop first, then run export before any other funnel command.

Does telemetry export modify or move the raw NDJSON records?▼

No. The raw store is append-only and immutable; export never writes into raw/, never moves or marks entries, and only changes CSV placement. Re-attribution is purely a CSV-level outcome.

What happens to a torn or malformed line during export?▼

An incomplete trailing line is skipped, a malformed interior line is skipped and counted, and unrecognized entry kinds are skipped. Because the raw store is immutable, a torn entry is never repaired by any later export; the loss is bounded to the one record in flight.

Is telemetry export output deterministic across runs?▼

Yes. Rows use a total ordering over start_ts, span_id, trace_id, then the serialized row, and each CSV is staged to a temporary file and published with one atomic rename, so an unchanged store yields byte-identical outputs.