Expand description
Pool, server, and peer metrics with histograms and a JSON snapshot.
The stats subsystem is split into small modules:
Histogram- Cassandra-style estimated histogram.PoolField/ServerField- typed metric handles.Snapshot- aggregate value rendered to JSON.StatsServer- REST endpoint serving the latest snapshot.
Stats glues the pieces together: a writer accumulates counters,
gauges, and histogram observations; a periodic aggregator publishes
a fresh Snapshot that the REST endpoint serves.
Structs§
- Aggregator
- Async aggregator handle: snapshots at a fixed interval into a shared cell that the REST server reads from.
- Failure
Metrics - Live, mutable accumulator for failure-cause counters.
- Failure
Snapshot - Immutable snapshot of every failure-cause metric.
- Histogram
- A fixed-bucket histogram for tracking latencies and payload sizes.
- Histogram
Summary - Pre-computed quantile summary derived from a
Histogram. - Metric
Spec - Static descriptor for a metric: how it is interpreted, what its canonical lower-case name is, and a one-line human description.
- NoTargets
Entry - A single labeled
dispatch_no_targets_totalrow. - Peer
Entry - A single labeled per-peer dispatch error row.
- Peer
State Entry - A single labeled
peer_state_currentgauge row. - Peer
Stats - Per-peer collected metrics. Mirrors
ServerStatsfor cluster peers. - PhiEntry
- A single labeled
gossip_phi_scoregauge row. - Pool
Stats - Per-pool collected metrics.
- Server
Stats - Per-datastore-server collected metrics.
- Service
Info - Engine-wide identifying strings included in every snapshot.
- Snapshot
- Aggregate snapshot of the stats subsystem at a point in time.
- Stats
- Live, mutable counters and histograms for a single engine instance.
- Stats
Server - A bound TCP listener serving the stats endpoint.
- Timeout
Entry - A single labeled
dispatch_response_timeout_totalrow. - Transition
Entry - A single labeled
peer_state_transitions_totalrow.
Enums§
- Latency
- Channels used to mutate histogram observations.
- Pool
Field - Typed handle for a pool metric.
- Queue
Gauge - Channels used for queue-length observations (observed at sample time, not events).
- Queue
Wait - Channels used for queue-wait-time observations.
- Server
Field - Typed handle for a server metric.
- Stats
Metric Type - Kind of metric tracked by the stats subsystem.
Constants§
- BUCKET_
COUNT - Number of buckets in the estimated histogram.
- MAX_
HEADERS - Maximum number of headers parsed in a single request.
- MAX_
REQUEST_ BYTES - Maximum number of bytes the server will read for an HTTP request line plus headers. Requests larger than this are rejected.
- POOL_
CODEC - Const slice of every pool metric descriptor in declaration order.
- SERVER_
CODEC - Const slice of every server metric descriptor in declaration order.
Functions§
- describe_
stats - Returns the human-readable description block printed by the
-Dcommand-line flag. - render_
prometheus - Render a
Snapshotin the Prometheus 0.0.4 text exposition format.
Type Aliases§
- Cluster
Info Provider - Type alias for a closure that produces a fresh
ClusterInfoSnapshotevery time the/cluster-info.txtroute is hit.