← Blog

Stario 3.4 — SQLite tracer from the environment

Historical post from the 3.x line. Current tracer env vars: Configuration and Telemetry.

Stario 3.4 parametrizes bundled tracers through environment variables and tracer_from_env():

bash
STARIO_TRACER=sqlite STARIO_TRACERS_SQLITE=traces.sqlite3 stario serve main:bootstrap

Optional STARIO_TRACERS_SQLITE_* variables tune flush interval and writer batching when you set them. JSON output follows the same pattern with STARIO_TRACER=json and STARIO_TRACERS_JSON_*.

Direction, not a pivot

Tracer tuning belongs in environment variables—what containers and process managers already use—not in a growing list of stario serve flags for every path and flush interval.

Stario 4 update: server runtime CLI flags (--tracer, --host, --port, and related knobs) are removed. Use STARIO_* for the server process; see Deployment. Tracer from_env() classmethods on bundled tracer types are removed too — use STARIO_TRACER / STARIO_TRACERS_* or construct SqliteTracer(path=…) directly. The public constructor API is unchanged.

Why bother with SQLite?

Finished spans land in one file on disk. You can ask plain SQL questions about a running app: average latency, slow routes, recent 5xx, failed spans, exception events, dropped spans. Handy on a laptop or any long-lived process where you want inspectable telemetry without standing up a separate stack.

Step-by-step setup, the full env var table, and copy-paste queries live in Getting insights from SQLite tracer.