Skip to main content

Module content

Module content 

Source
Expand description

Content export for external telemetry (the tenant OpenTelemetry collector).

The audit worker hands every step it has journaled and published to an optional ContentSink as a ContentRecord: the OCSF event plus the step’s content (the new input message, the model output, tool calls and results, token usage, finish reason). agentvisord installs a sink that turns records into OpenTelemetry GenAI spans for the tenant collector only; the operational collector never receives content. The library has no telemetry dependency: without an installed sink nothing is exported.

Structs§

AuditOutputs
Everything the audit worker applies to a step on its way out: the redaction engine (before journal and broker writes) and the content dispatcher (after the step is durable and published).
ContentDispatcher
Hands records from the audit worker to a ContentSink on a dedicated thread. The worker only does a non-blocking try_send; redaction, serialization, and export all run on the sink thread, and a panicking sink cannot reach the worker.
ContentRecord
One journaled step in content form.

Constants§

CONTENT_QUEUE_CAPACITY
Records waiting for the sink thread. A full queue drops new records (counted in av_content_records_dropped_total) instead of slowing the audit worker.

Traits§

ContentSink
Receives journaled steps. Called on a dedicated thread, one record at a time, in journal order per session.

Type Aliases§

SharedContentSink
A dispatcher slot shared by the application state and the audit worker, so a sink can be installed after both exist.