Expand description
Pluggable metrics sink.
The framework emits structured counters / gauges / histograms at
every observable event. Host services plug in a MetricsSink
implementation to ship them somewhere — Prometheus, StatsD, an
in-process accumulator, anything.
The default NoopSink discards everything.
§Why a trait, not a global registry
Different host services own different metrics backends. The bot is an embedded library; forcing a particular metrics layer would force every downstream consumer onto that layer. A small trait is cheap and lets the host stay in control.
Structs§
- Noop
Sink - Default sink that discards everything. Lower overhead than even a
tracing::trace!call.
Traits§
- Metrics
Sink - Push-based metrics interface.