Skip to main content

Module audit

Module audit 

Source
Expand description

Structured audit trail for the ACT host.

Two record kinds mirror the span/event split that OTLP wants: a tool call is a span, and the capability decisions it triggers are events inside it.

Re-exports§

pub use emit::emit_cap_decision;
pub use emit::emit_ceiling_class;
pub use emit::emit_credential_issue;
pub use emit::finish_tool_call;
pub use emit::instantiation_span;
pub use emit::tool_call_span;
pub use layer::AuditLayer;
pub use layer::Detail;
pub use record::CapDecisionRecord;
pub use record::CeilingClassRecord;
pub use record::CredentialIssueRecord;
pub use record::Decision4;
pub use record::Outcome;
pub use record::ToolCallStart;
pub use record::Transport;
pub use record::sha256_hex;

Modules§

emit
The only module that calls tracing macros.
layer
The audit layer.
record
The audit record types. These are field carriers: emit.rs is the only module that turns them into tracing events.
render
Human rendering of audit records. Pure: takes data, returns a String.

Constants§

TARGET_AUDIT
Target for host-authored audit records. The audit layer’s filter is pinned to this and nothing else.
TARGET_GUEST
Target reserved for guest-emitted telemetry (wasi:otel, deferred — see the design doc §4.2). Guest events are untrusted input and must never reach the audit stream, so they are kept on a separate target that the audit layer’s filter structurally excludes.

Functions§

fmt_filter
A fmt-layer filter that lets ordinary logs through and drops both audit streams.