← Blog

Stario 3.4 — SQLite tracer from the environment

Stario 3.4 parametrizes bundled tracers through from_env(). For SQLite—the main story in this release—you pick the sink and file path with environment variables, no --tracer on the serve command:

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

Optional TRACES_SQLITE_* variables tune flush interval and writer batching when you set them. JSON output follows the same pattern with STARIO_TRACER=json and TRACES_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.

That is a direction, not a breaking change. --tracer still works. SqliteTracer(path=…) and the rest of the public API are unchanged. from_env() is how the CLI wires built-ins when env is set; omit vars and you get the same defaults as always. More settings may move into env over time; nothing from 3.3 goes away.

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.