Skip to main content

TraceSink

Trait TraceSink 

Source
pub trait TraceSink: Send {
    // Required methods
    fn emit_runtime_info(
        &mut self,
        runtime_version: &str,
        wasmtime_version: &str,
        timestamp: &str,
    );
    fn emit_invoke(
        &mut self,
        trace_id: &str,
        session_id: &str,
        step: u64,
        graph_id: &str,
        graph_version: &str,
        brick_id: &str,
        brick_version: &str,
        bundle_digest: &str,
        node_id: &str,
        envelope_bytes: &[u8],
        trigger_source_node_id: &str,
        trigger_source_step: u64,
        trigger_edge_id: &str,
        trigger_routing_reason: &str,
        result: &BrickResult,
        result_bytes: Option<&[u8]>,
        latency_ms: f64,
        timestamp: &str,
    );

    // Provided method
    fn enabled(&self) -> bool { ... }
}
Expand description

Pluggable trace emission. JsonlTraceWriter for CLI; NullTrace for bench.

Required Methods§

Source

fn emit_runtime_info( &mut self, runtime_version: &str, wasmtime_version: &str, timestamp: &str, )

Source

fn emit_invoke( &mut self, trace_id: &str, session_id: &str, step: u64, graph_id: &str, graph_version: &str, brick_id: &str, brick_version: &str, bundle_digest: &str, node_id: &str, envelope_bytes: &[u8], trigger_source_node_id: &str, trigger_source_step: u64, trigger_edge_id: &str, trigger_routing_reason: &str, result: &BrickResult, result_bytes: Option<&[u8]>, latency_ms: f64, timestamp: &str, )

Provided Methods§

Source

fn enabled(&self) -> bool

Returns false to skip all trace work (timestamp allocation, serialization). NullTrace returns false; real writers return true (default).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§