Skip to main content

Module emit

Module emit 

Source
Expand description

Tracing transport for ObservabilityEvent.

All events are emitted as a single tracing::info! call under the rig_tap target. The legacy event field carries the JSON-encoded envelope, while stable scalar rig_tap.* fields make OpenTelemetry collector routing and indexing possible without JSON parsing.

Constants§

EVENT_TARGET
Target string used on every rig_tap event.

Functions§

build_event
Build a fully-formed ObservabilityEvent for kind belonging to conversation_id, stamped with the next tick and current wall time.
current_span_id
Return the numeric id of the currently-active tracing::Span, if any.
emit
Emit event over the rig_tap tracing target. Serialization failures are logged at warn level under the same target and otherwise swallowed so that telemetry never panics the agent loop.
emit_kind
Convenience: build + emit in one call.
next_tick
Return the next monotonic per-process tick.
now_millis
Return the current wall-clock time in milliseconds since the Unix epoch. Returns 0 if the clock is set before the epoch.
try_emit
Emit event over the rig_tap tracing target as a single info!-level event carrying a JSON-encoded event field.