v0.5.0
Highlights
-
Trace engine - record every
receive()/send()as structured traces
with nanosecond timestamps. Enable with a single flag:inspector = Inspector(app, trace=True) # ... drive the app ... record = inspector.traces[0] record.scope.method # "GET" record.scope.path # "/api/users" record.summary.ttfb_ns # time to first byte (ns)
Pluggable storage via
TraceStorageprotocol. Built-in:MemoryStorage
(default) andFileStorage(one JSON file per trace). -
Deterministic sampling -
sample_rateparameter on Inspector.
Hash-based, same endpoint always produces the same decision for a given rate. -
asgion traceCLI command - human-readable trace output with
color-coded phases, inline violation markers with severity, and per-record
breakdown:$ asgion trace myapp:appTRACE GET / (0.070ms, TTFB 0.042ms) 0.020ms send http.response.body 4 bytes ← HF-002 (error) 0.042ms send http.response.start 200 (+0.022ms) ← SEM-002 (info) 0.059ms send http.response.body 5 bytes (+0.016ms) Events: 3 | Violations: 2 (1 error, 1 info)--format jsonfor machine-readable output,--outfor file storage.
Fixes
-
CLI
check/trace: WS runner now sends awebsocket.receivemessage
before disconnect, avoiding app crashes on frameworks that expect data
after accept (e.g. Starlette). -
CLI
check: summary line now reports application errors instead of
showing "No violations found" when a scope raised an exception.
Full changelog: CHANGELOG.md