Skip to main content

Module emit

Module emit 

Source
Expand description

The only module that calls tracing macros.

Every value is passed as a typed field. Nothing here formats a human sentence — that is the layer’s job (render.rs), and doing it at the emission site would collapse the OTLP export into one opaque attribute.

Functions§

emit_cap_decision
Emit one capability decision as an event inside the current span.
emit_ceiling_class
One resolved capability class, as seen at instantiation. Carries no decision — that is what distinguishes it from a CapDecisionRecord event at the layer, which decodes strictly by presence of act.decision.
emit_credential_issue
One credential handed to a component. Carries no decision and no capability id, which is how the layer tells it apart from the two event shapes above — act.credential.kind is present on this event and on nothing else.
finish_tool_call
Record the terminal fields on an open tool-call span. The layer flushes the rollup when the span closes, which happens when the caller drops it.
instantiation_span
Open the envelope span for one component instantiation. One span per component load; one emit_ceiling_class event per capability class inside it. Modelled exactly like tool_call_span / emit_cap_decision so the same layer machinery renders it and an OTLP exporter gets queryable per-class attributes instead of a pre-formatted sentence.
tool_call_span
Open the envelope span for one tool call. act.outcome and act.duration_ms are declared empty and filled by finish_tool_call.