You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #901 (towards #893) records the traces signal locally: every session writes a per-session ~/.infer/telemetry/<session>-traces.jsonl with a session root span, chat <model> spans per
LLM turn, and execute_tool <name> spans per tool call. Nothing in the CLI renders them yet -
the only consumer today is an OTLP collector, which most users don't run.
Add a local span-tree viewer, paired the same way infer stats / /stats are:
infer traces [session-id] - render the span tree of a session (default: the most recent one)
from the local trace file, with durations, so per-run latency questions ("what took 27s in that
run?") are answerable without any collector:
/traces [session-id] - the same view as a chat shortcut (markdown output), matching the internal/shortcuts/stats.go pattern.
This is read-only over the existing -traces.jsonl format (one stdouttrace span stub JSON object
per line, already parsed by internal/telemetry/tracer_test.go::readSpans). Once subprocess span
ingestion lands (#904), child-process spans appear in this view automatically as children of
their tool span - no viewer changes needed.
Acceptance Criteria
infer traces [session-id] renders the span tree (root -> LLM turns -> tool calls) with per-span durations from the local per-session trace file; with no argument it picks the most recent session.
infer traces --list (or equivalent) enumerates sessions that have trace files, so a session id can be found without ls-ing the telemetry dir.
/traces [session-id] chat shortcut renders the same tree as markdown, mirroring the stats command/shortcut pairing.
--format json emits the tree as structured output.
Spans with error status / error.type are visibly marked.
Works fully offline from local files; no OTLP endpoint required; no prompt/response content displayed beyond existing span names/attributes.
Activity
feat(telemetry): add traces and logs to the telemetry package (#901)
feat(telemetry): add infer traces command and /traces shortcut (#908)
feat(telemetry): propagate W3C trace context to subprocesses and inge…
inference-gateway-releaser commentedon Jul 16, 2026
🎉 This issue has been resolved in version 0.147.0 🎉
The release is available on:
Your semantic-release bot 📦🚀