photon-telemetry 0.1.1

Photon OpsLog telemetry port
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::OpsLog;

/// Zero-cost no-op (benchmark `telemetry=off` and minimal CI).
#[derive(Debug, Default, Clone, Copy)]
pub struct NoOpsLog;

impl OpsLog for NoOpsLog {
    fn record_counter(&self, _name: &str, _labels: &[(&str, &str)], _value: f64) {}

    fn record_gauge(&self, _name: &str, _labels: &[(&str, &str)], _value: f64) {}

    fn log_event(&self, _name: &str, _payload: &serde_json::Value) {}
}