pub struct VCLPrometheusExporter { /* private fields */ }Expand description
Prometheus metrics exporter for VCL Protocol.
Exposes all VCL metrics in Prometheus text format, ready to be scraped by a Prometheus server.
Implementations§
Source§impl VCLPrometheusExporter
impl VCLPrometheusExporter
Sourcepub fn update_bytes_sent(&self, bytes: u64)
pub fn update_bytes_sent(&self, bytes: u64)
Record bytes sent.
Sourcepub fn update_bytes_received(&self, bytes: u64)
pub fn update_bytes_received(&self, bytes: u64)
Record bytes received.
Sourcepub fn update_packets_sent(&self, count: u64)
pub fn update_packets_sent(&self, count: u64)
Record packets sent.
Sourcepub fn update_packets_received(&self, count: u64)
pub fn update_packets_received(&self, count: u64)
Record packets received.
Sourcepub fn update_retransmit(&self)
pub fn update_retransmit(&self)
Record a retransmission.
Sourcepub fn update_dropped(&self, count: u64)
pub fn update_dropped(&self, count: u64)
Record dropped packets.
Sourcepub fn set_connections_active(&self, count: f64)
pub fn set_connections_active(&self, count: f64)
Set active connection count.
Sourcepub fn update_reconnect(&self)
pub fn update_reconnect(&self)
Record a reconnect.
Sourcepub fn update_handshake(&self)
pub fn update_handshake(&self)
Record a handshake.
Sourcepub fn update_key_rotation(&self)
pub fn update_key_rotation(&self)
Record a key rotation.
Sourcepub fn set_loss_rate(&self, rate: f64)
pub fn set_loss_rate(&self, rate: f64)
Set current loss rate.
Sourcepub fn set_rtt_seconds(&self, rtt: f64)
pub fn set_rtt_seconds(&self, rtt: f64)
Set current RTT in seconds.
Sourcepub fn set_obfuscation_overhead(&self, ratio: f64)
pub fn set_obfuscation_overhead(&self, ratio: f64)
Set obfuscation overhead ratio.
Sourcepub fn update_dns_queries(&self, count: u64)
pub fn update_dns_queries(&self, count: u64)
Record DNS queries intercepted.
Sourcepub fn update_dns_blocked(&self, count: u64)
pub fn update_dns_blocked(&self, count: u64)
Record DNS queries blocked.
Sourcepub fn update_dns_cache_hits(&self, count: u64)
pub fn update_dns_cache_hits(&self, count: u64)
Record DNS cache hits.
Sourcepub fn update_fragments_sent(&self, count: u64)
pub fn update_fragments_sent(&self, count: u64)
Record fragments sent.
Sourcepub fn update_fragments_reassembled(&self, count: u64)
pub fn update_fragments_reassembled(&self, count: u64)
Record fragments reassembled.
Sourcepub fn set_tunnel_state(&self, state: f64)
pub fn set_tunnel_state(&self, state: f64)
Set tunnel state (0=Stopped, 1=Connecting, 2=Connected, 3=Reconnecting, 4=Failed).
Sourcepub fn update_from_metrics(&self, m: &VCLMetrics)
pub fn update_from_metrics(&self, m: &VCLMetrics)
Update all counters from a VCLMetrics snapshot.
Counters are incremental — call this each time you want to push the delta since last call. For simplicity this resets and re-adds the full values (idempotent for Prometheus pull model).
Sourcepub fn update_from_tunnel_stats(&self, stats: &TunnelStats)
pub fn update_from_tunnel_stats(&self, stats: &TunnelStats)
Update all gauges and counters from a TunnelStats snapshot.