Skip to main content
Blitz
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage
Edit page

Logs and telemetry

Spec: observability.

Diagnostic log

~/.blitz/logs/blitz-YYYY-MM-DD.jsonl (owner-only, secrets masked, kept log.retain_days, 14 by default) records warnings, failed turns and errors, with trace IDs when telemetry is on. log.level (or BLITZ_LOG_LEVEL) is debug, info, warn, error or off. A background goroutine writes it, so logging never waits on the disk. The desktop app reads it in Settings › System › Logs, where a past day’s log can be deleted (today’s is still being written).

More detail from one part of Blitz

Each part of Blitz logs under its own name, and [log.levels] turns up the detail for just that part, leaving the rest at log.level. A name covers the names under it (gateway covers gateway.token), and the most specific one wins:

[log.levels]
gateway = "debug"         # every call to your custom gateway
"gateway.token" = "warn"  # but not each run of its token script
Name At debug, it records
gateway Each model built for your custom gateway (its API, base URL, path and header names), each request (the URL, which attempt and why, how long the reply took to start, the status, and the start of an error’s reply), and each failed call.
gateway.token Each run of the token script (how long it took, or why it failed) and each token dropped or rejected.

No token is ever written. The service reads the levels when it starts: set them in ~/.blitz/.env.toml and restart the service. For one run from a shell, BLITZ_LOG_LEVELS=gateway=debug blitz --local does the same. Every line names its part in a logger field, so you can pick them out in Settings › System › Logs.

The audit log is separate: a record of what the agent did, not of Blitz’s own health.

OpenTelemetry

Telemetry is off by default, and nothing is sent unless you turn it on. With [telemetry] enabled = true (or BLITZ_TELEMETRY=1), traces, logs and metrics are exported over OTLP/HTTP to telemetry.endpoint, else OTEL_EXPORTER_OTLP_ENDPOINT, else http://localhost:4318. Other OTEL_EXPORTER_OTLP_* settings apply.

The service exports, not the CLI, and it reads [telemetry] and BLITZ_TELEMETRY when it starts: after changing them, restart it (Restart the service in the desktop app’s settings or the tray’s menu). A service started at login doesn’t see your shell’s variables, so set [telemetry] in ~/.blitz/.env.toml (Settings) for it; BLITZ_TELEMETRY=1 blitz --local runs a service of its own that exports.

[telemetry]
enabled = true
endpoint = "http://localhost:4318"
# capture_content = false
  • One trace per prompt: a turn span (agent, model, token counts, cost) containing the ADK’s agent, model-call and tool spans, plus approval (time spent waiting on you), hook and compact spans.
  • Sessions are chains of turns, not one long trace, because sessions last days and resume in new processes. Every span carries the session as gen_ai.conversation.id, and each turn has a turn.index and a link to the previous turn, even after --resume.
  • No content by default. Prompts, replies, tool arguments and tool results aren’t exported; Blitz removes the ADK’s tool arguments and results from its spans before export. capture_content = true includes them, with secrets masked.
  • Metrics go to the same collector every 30 seconds: sessions, turns (by agent and outcome), tokens and estimated cost (by model), tool calls (by tool and outcome) and approval decisions (by action and how each was made: by you, a rule, the mode, a hook or the auto reviewer).
  • Export runs on background goroutines and gives up after 3 seconds at exit if the collector is unreachable.