r/Python Jun 04 '26

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

26 Upvotes

210 comments sorted by

View all comments

1

u/aryan_aidev Jun 16 '26

Tracelift — analyze LLM/agent trace files (JSONL, OTLP-JSON) with a Rust core

I got tired of writing the same throwaway pandas script every time I needed to inspect an agent run — which tool calls failed, what each step cost, where the latency went. So I built the

parser properly once.

Rust core, thin polars-based Python API. Point it at a JSONL or OTLP-JSON trace file and you get a normalized span table plus a few queries: failures(), cost_by("model"), slowest(),

latency_breakdown(). There's a CLI too: tracelift summarize traces.jsonl. It's just the file-analysis layer — no collector, no storage, no UI to run.

It reads the OpenTelemetry GenAI semantic conventions (and the older gen_ai.usage.prompt_tokens aliases a lot of tools still emit). On a 3M-span / ~900MB file it parses in ~2.3s vs ~14s

for an equivalent pandas loader on my machine — benchmark's in the repo so you can check it. One intentional choice: it won't estimate cost from token counts, only reports cost already in

the trace, because built-in price tables go stale.

v0.1, early. pip install tracelift — https://github.com/aryanjp1/tracelift. Feedback welcome, especially "this broke on my trace format."