Skip to content

v0.5.0

Choose a tag to compare

@ack1d ack1d released this 26 Feb 01:55

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 TraceStorage protocol. Built-in: MemoryStorage
    (default) and FileStorage (one JSON file per trace).

  • Deterministic sampling - sample_rate parameter on Inspector.
    Hash-based, same endpoint always produces the same decision for a given rate.

  • asgion trace CLI command - human-readable trace output with
    color-coded phases, inline violation markers with severity, and per-record
    breakdown:

    $ asgion trace myapp:app
    
    TRACE  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 json for machine-readable output, --out for file storage.

Fixes

  • CLI check/trace: WS runner now sends a websocket.receive message
    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