pub trait TelemetrySink: Send + Sync {
// Required method
fn record(&self, event: &PipelineEvent) -> Result<()>;
// Provided methods
fn record_summary(&self, _summary: &SessionSummary) -> Result<()> { ... }
fn flush(&self) -> Result<()> { ... }
}Expand description
Persistence backend for telemetry events and summaries.
Implementations must be safe to call from multiple threads via shared
ownership (Arc<dyn TelemetrySink>).
Required Methods§
Sourcefn record(&self, event: &PipelineEvent) -> Result<()>
fn record(&self, event: &PipelineEvent) -> Result<()>
Append a single per-response event.
Provided Methods§
Sourcefn record_summary(&self, _summary: &SessionSummary) -> Result<()>
fn record_summary(&self, _summary: &SessionSummary) -> Result<()>
Append the session summary at session close. Default no-op for sinks that don’t distinguish rollups.