Telemetry & Observability
Last updated: April 22, 2026
Anvil's observability stack — Sentry error tracking, OpenTelemetry traces, structured pino logs — is opt-in for the CLI and the on-device drivers. The dashboard at anvil.koydo.app is always instrumented because it is hosted by us.
Default state
The CLI ships with telemetry off. Running anvil run --trace prints the local span tree to your terminal and writes spans.json in the run output dir, but does not transmit anything to our servers. The on-device iOS driver only initializes Sentry when KID_SENTRY_DSN is set in its environment; it ships with no DSN and no SDK linked.
Enabling telemetry
One command: anvil config set telemetry.enabled true. That flips the bit in ~/.anvil/config.json and tells the CLI it may upload spans (via --upload-run-id <uuid>) and forward OTLP traffic when OTEL_EXPORTER_OTLP_ENDPOINT is set.
What we collect when telemetry is on
- Spans: name, parent id, timing, org-tagged. Attributes are limited to RPC method, handler name, device port, run id. We do not collect the params your handlers receive or the data they return.
- Errors: stack trace, exception class, file path, build SHA, environment. We do not transmit the local variables in the stack frames; Sentry SDK is initialized with
sendDefaultPii: false. - Structured logs: the dashboard server emits pino JSON with fields
{ts, level, msg, traceId, spanId, runId, deviceUdid, handlerName, durationMs}. CLI structured logs are local-only by default; only the dashboard ships them to a log aggregator.
Retention
Spans are stored in anvil_run_spansunder your org for as long as the parent run record exists (default: 90 days for free tier, configurable per-plan). Sentry events follow Sentry's own retention. We drop both immediately on org deletion.
Opting out
anvil config set telemetry.enabled false stops all uploads from your CLI. Removing the Sentry DSN from your driver build env stops on-device error reporting. Already- uploaded data can be deleted on request — email anvil@koydo.app with your org id.