Skip to main content

Module layer

Module layer 

Source
Expand description

The audit layer.

Rollup requires state accumulated across events within a span, which a FormatEvent implementation cannot hold — so this is a full Layer that keeps per-span state in span extensions:

  • on_new_span — capture the envelope fields, install an empty Rollup
  • on_record — pick up outcome / duration_ms recorded at finish
  • on_event — print exceptions now, fold allows into the parent span
  • on_close — render and flush the rollup line

Structs§

AuditLayer
StderrWriter
The production sink: stderr, line-buffered, failures ignored.

Enums§

Detail
How much the operator wants to see.

Constants§

DEFAULT_ROLLUP_CAP
Default cap on distinct rollup groups per tool call. Chosen to comfortably cover a well-behaved component; past it, new groups collapse into a count.

Traits§

AuditWriter
Where rendered lines go. Abstracted so tests can capture them.