Skip to main content

TelemetryBackend

Trait TelemetryBackend 

Source
pub trait TelemetryBackend {
    // Required methods
    fn emit_snapshot(&mut self, snapshot: &MemorySnapshot);
    fn emit_warning(&mut self, message: &str);
    fn flush(&mut self);
}
Expand description

Pluggable backend for telemetry integration.

Implement this trait to integrate with external monitoring systems (Prometheus, DataDog, CloudWatch, etc.)

Required Methods§

Source

fn emit_snapshot(&mut self, snapshot: &MemorySnapshot)

Emit a memory snapshot to the telemetry system.

Source

fn emit_warning(&mut self, message: &str)

Emit a warning when memory usage approaches threshold.

Source

fn flush(&mut self)

Flush any buffered metrics.

Implementors§