Repository navigation
Labels
Description
Summary
inference-gateway/cli#908 (closes inference-gateway/cli#903) adds a local span-tree viewer for the traces recorded by inference-gateway/cli#901: a new infer traces command and a /traces chat shortcut. Both are undocumented.
User-facing behavior to document:
infer traces [session-id]- renders the span tree of a session (session root -> LLM turns -> tool calls) with per-span durations, read from the local per-session trace file under~/.infer/telemetry/<session>-traces.jsonl. With no argument it picks the most recent session.infer traces --list- enumerates sessions that have trace files.infer traces --format json- emits the tree as structured output (span names, start times, durations in fractional milliseconds, attributes, children)./traces [session-id]- the same view as a chat shortcut, mirroring theinfer stats//statspairing.- Spans with error status or an
error.typeattribute are marked with[error: <type>]. - Works fully offline from local files; no OTLP collector required; requires
telemetry.enabled: truefor traces to be recorded in the first place.
Example output:
session (standard, success) 38.8s
|-- chat ollama_cloud/deepseek-v4-flash 3.4s
|-- execute_tool Read 162us
`-- chat ollama_cloud/deepseek-v4-flash 8.1s
Affected pages:
- CLI command reference: add
infer tracesalongsideinfer stats. - Chat shortcuts page: add
/tracesalongside/stats. - Telemetry/observability page (if present): mention the local trace files and the viewer.
Source: inference-gateway/cli#908, inference-gateway/cli#903.
Acceptance Criteria
-
infer traces(including--listand--format json) is documented in the CLI command reference with an example span tree. -
/tracesis documented on the chat shortcuts page. - The telemetry docs mention that traces are recorded locally per session and can be viewed offline with
infer traces.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Jul 14, 2026
@claude Can you work on this?
inference-gateway-maintainer commentedon Jul 14, 2026
Claude finished @edenreich's task in 14m 33s —— View job •
docs/issue-390-20260714-1140• [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-390-20260714-1140?quick_pull=1&title=Issue%20%23390%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23390%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Documenting
infer tracescommand and/tracesshortcutDone. Opened PR #393 documenting the
infer tracescommand and the/traceschat shortcut.infer stats//stats/ telemetry are documentedinfer traces(--list,--format json) to CLI command reference with example span tree/tracesto the chat shortcuts (Built-in Shortcuts) sectionformat:check,lint:md,buildall pass)What changed
cli.mdinfer statsandinfer tracesrows to the Core Commands table.infer traces [session-id],--list,--format json, the indented span-tree example, the JSON output shape (span name, start time, duration in fractional ms, attributes, children), and the[error: ...]marker for failed spans - all read offline from the local trace file, no OTLP collector required./statsand/tracesto the Built-in Shortcuts table plus a new Telemetry Shortcuts section.observability.mdinfer traces, with the span-tree example and--list/--format jsonnote.All three acceptance criteria are covered.
Notes for the reviewer
infer stats//statswere referenced in the docs but missing from the command and shortcut tables, so I added them alongsidetracesfor coherence (matching the pairing described in the issue).telemetry.enabled: true, butcli.mdcurrently documents CLI telemetry as "always on - there is no opt-out switch." I kept the new content consistent with that committed wording. If the CLI now gates trace recording behind a config flag, the Telemetry section's "always on" statement should be updated too. Flagged in the PR body.\<session-id\>path placeholders match the existing committed convention in the same Telemetry section (they render identically to the untouched-logs.jsonl/.jsonlrows).docs/issue-390-20260714-1140inference-gateway-releaser commentedon Jul 18, 2026
🎉 This issue has been resolved in version 0.9.2 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀