Skip to content
DocumentationObserve and trace history
On this page

Page resources

Open Markdownllms.txtView source

Last updated

This recipe follows one order mutation from accepted intent through runtime signals, provider evidence, and immutable causal facts.

The Rust and command outputs below are illustrative end-product examples.

1. Emit an owned observation envelope

ctx.observe(Observation::metric(
    subjects::operation(operations::PlaceOrder),
    "latency",
    Duration::milliseconds(84),
).with_correlation(ctx.invocation_ref())
 .with_freshness(Instant::now()))?;

The observation records subject, kind, value, time semantics, source, correlation, trust, freshness, sensitivity, and retention. The metric name is not used as the operation identity.

2. Inspect live signals

$ one inspect invocation:sha256:91ab… --observations
metric latency 84ms source gateway fresh
log "carrier request accepted" source adapter sensitive:user
trace child provider-call:sha256:22c1… complete

Missing telemetry remains missing; absence does not prove success or failure.

3. Follow causal facts

$ one inspect invocation:sha256:91ab… --history
intent accepted fact:sha256:1001…
authorization issued fact:sha256:1002… caused_by 1001…
dispatch attempted fact:sha256:1003… caused_by 1002…
provider receipt linked fact:sha256:1004… caused_by 1003…
effect reconciled fact:sha256:1005… caused_by 1004…

History facts are assertions with provenance. A provider receipt is linked as external evidence; it does not become a One fact by ingestion.

4. Replay within stated limits

$ one inspect history:fact-set:sha256:a883… --replay
deterministic decisions reproduced
external effects not redelivered
provider state referenced, not reconstructed
missing observation window 2027-01-10T10:03Z..10:04Z

5. Apply privacy policy

customer identifiers tokenized after 30d
payment details erased after settlement + 90d
causal relationship retained by opaque subject reference
erasure receipt history:fact:sha256:ee91…

See observability and history and inspect and operate.