tailtriage-core
Core run schema, split request lifecycle API, and instrumentation primitives for tailtriage.
For the public repo launch, the primary path is workspace/source integration from this repository. Crates.io snippets below are post-publish guidance.
Use from this repo now
From the workspace root, run examples and analysis directly:
Post-publish crate add (when released)
[]
= "0.1"
What this crate owns
- Run artifact schema (
Run, requests, stages, queues, inflight snapshots, runtime snapshots) - Unified started-request model (
Tailtriage,StartedRequest,RequestHandle,RequestCompletion) - Queue/stage/in-flight instrumentation primitives
- Explicit completion token lifecycle (
finish,finish_ok,finish_result) and final artifact flush (shutdown)
Minimal usage
use ;
# async
Lifecycle ownership
begin_request(...) / begin_request_with(...) returns StartedRequest { handle, completion }:
started.handle(RequestHandle) is instrumentation-onlystarted.completion(RequestCompletion) is the only finish path
queue(...), stage(...), and inflight(...) do not finish the request. Every request must be finished exactly once via finish(...), finish_ok(), or finish_result(...).
Shutdown semantics
shutdown()does not auto-finish requests.shutdown()does not fabricate timings or outcomes.- unfinished requests are surfaced in run metadata warnings and unfinished-request samples.
strict_lifecycle(true)makesshutdown()return an error when unfinished requests remain.
Related docs
- Repo docs index: https://github.com/SG-devel/tailtriage/tree/main/docs
- Tokio integration crate: https://github.com/SG-devel/tailtriage/tree/main/tailtriage-tokio
- CLI crate: https://github.com/SG-devel/tailtriage/tree/main/tailtriage-cli