Crate fedimint_metrics

Crate fedimint_metrics 

Source

Re-exports§

pub use prometheus;

Modules§

server 🔒
HTTP server for exposing Prometheus metrics.

Macros§

histogram_opts
Create a [HistogramOpts][crate::HistogramOpts].
opts
Create an [Opts][crate::Opts].
register_histogram_with_registry
Create a Histogram and registers to a custom registry.
register_int_counter_vec_with_registry
Create an IntCounterVec and registers to a custom registry.

Structs§

Histogram
A [Metric] counts individual observations from an event or sample stream in configurable buckets. Similar to a Summary, it also provides a sum of observations and an observation count.
HistogramTimerExt
A wasm-safe histogram timer that uses fedimint_core::time::now instead of std::time::Instant, which is not available on wasm targets.
TextEncoder
An implementation of an Encoder that converts a [MetricFamily] proto message into text format.

Statics§

AMOUNTS_BUCKETS_SATS
REGISTRY

Traits§

Encoder
An interface for encoding metric families into an underlying wire protocol.
HistogramExt
Extension trait for Histogram that provides a wasm-safe timer.

Functions§

get_metrics
Returns all registered metrics encoded in Prometheus text format.
spawn_api_server
Spawns an HTTP server that exposes Prometheus metrics on /metrics.

Type Aliases§

Gauge
A [Metric] represents a single numerical value that can arbitrarily go up and down.
GaugeVec
A [Collector] that bundles a set of Gauges that all share the same [Desc], but have different values for their variable labels. This is used if you want to count the same thing partitioned by various dimensions (e.g. number of operations queued, partitioned by user and operation type).
HistogramVec
A [Collector] that bundles a set of Histograms that all share the same [Desc], but have different values for their variable labels. This is used if you want to count the same thing partitioned by various dimensions (e.g. HTTP request latencies, partitioned by status code and method).
IntCounter
The integer version of [Counter]. Provides better performance if metric values are all positive integers (natural numbers).
IntCounterVec
The integer version of [CounterVec]. Provides better performance if metric are all positive integers (natural numbers).