pub enum MetricEvent {
FlowCreated,
FlowEvicted,
FlowShed,
FlowShedSourceLimit,
DatagramIn(usize),
DatagramOut(usize),
DatagramDropped(DropReason),
}Expand description
Metric events the core asks the shell to record. The shell owns the
incr!/count!/gauge!/time! macros (lib/src/metrics/).
protocol::mux::h2’s MetricEvent is a different type with the same name,
and deliberately so: it carries the H2 core’s own vocabulary and shares no
variant with this one. Converging them would put H2 connection gauges
inside Output::Metric, which every consumer of this enum would then
have to match on. The shared name is the same idiom
crate::protocol::tcp_preread::Output and Output already use.
Variants§
FlowCreated
A new flow was admitted (udp.flows.created, udp.active_flows += 1).
FlowEvicted
A flow was torn down by idle/teardown/drain (udp.flows.evicted,
udp.active_flows -= 1).
FlowShed
A new flow was shed at the cap (udp.flows.shed).
FlowShedSourceLimit
A new flow was shed because its source address or subnet already holds
the cluster’s per-source flow limit (udp.flows.shed and
udp.flows.shed.source_limit).
DatagramIn(usize)
A client→backend datagram was forwarded (udp.datagrams.in,
udp.bytes.in). Carries the payload byte count (excludes any PPv2
prefix the core adds).
DatagramOut(usize)
A backend→client datagram was returned (udp.datagrams.out,
udp.bytes.out).
DatagramDropped(DropReason)
A datagram was dropped, by reason (udp.datagrams.dropped).
Trait Implementations§
Source§impl Clone for MetricEvent
impl Clone for MetricEvent
impl Copy for MetricEvent
Source§impl Debug for MetricEvent
impl Debug for MetricEvent
impl Eq for MetricEvent
Source§impl PartialEq for MetricEvent
impl PartialEq for MetricEvent
impl StructuralPartialEq for MetricEvent
Auto Trait Implementations§
impl Freeze for MetricEvent
impl RefUnwindSafe for MetricEvent
impl Send for MetricEvent
impl Sync for MetricEvent
impl Unpin for MetricEvent
impl UnsafeUnpin for MetricEvent
impl UnwindSafe for MetricEvent
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.