TelemetrySink

Trait TelemetrySink 

Source
pub trait TelemetrySink<Event>: Send + Sync {
    // Required method
    fn record(&self, event: &Event) -> Result<()>;

    // Provided method
    fn flush(&self) -> Result<()> { ... }
}
Expand description

A lightweight sink used to record telemetry events emitted by extracted components. The Event type is intentionally generic so downstream consumers can supply their own event schema without depending on vtcode-core internals.

Required Methods§

Source

fn record(&self, event: &Event) -> Result<()>

Record an event produced by the component.

Provided Methods§

Source

fn flush(&self) -> Result<()>

Flush any buffered telemetry data to its destination.

Implementors§

Source§

impl<Event> TelemetrySink<Event> for MemoryTelemetry<Event>
where Event: Clone + Send + Sync,

Source§

impl<Event> TelemetrySink<Event> for NoopTelemetry