Trait Export

pub trait Export: Debug {
    // Required method
    fn export(&self, message: InstanceMessage<'_>);
}
Expand description

Trait for exporting telemetry data to external systems.

Implementors of this trait define how telemetry data should be exported, whether to files, network endpoints, or other destinations.

§Examples

use veecle_telemetry::collector::Export;
use veecle_telemetry::protocol::InstanceMessage;

#[derive(Debug)]
struct CustomExporter;

impl Export for CustomExporter {
    fn export(&self, message: InstanceMessage<'_>) {
        // Custom export logic here
        println!("Exporting: {:?}", message);
    }
}

Required Methods§

fn export(&self, message: InstanceMessage<'_>)

Exports a telemetry message.

This method is called for each telemetry message that needs to be exported. The implementation should handle the message appropriately based on its type.

Implementors§