Module statistics

Source
Expand description

Helpers for managing storage statistics.

This module collects statistics related to sources and sinks. Statistics, as exposed to their respective system tables have strong semantics, defined within the mz_storage_types::statistics module. This module collects and aggregates metrics across workers according to those semantics.

Note that it simultaneously collect prometheus metrics for the given statistics. Those metrics do not have the same strong semantics, which is by design to ensure we are able to categorically debug sources and sinks during complex failures (or bugs with statistics collection itself). Prometheus metrics are

  • Never dropped or reset until a source/sink is dropped.
  • Entirely independent across workers.

Structsยง

AggregatedStatistics
A structure that keeps track of local statistics, as well as aggregating statistics into a single worker (currently worker 0).
SinkStatisticsMetricDefs ๐Ÿ”’
SinkStatisticsMetrics
Prometheus metrics for user-facing sink metrics.
SinkStatisticsRecord
Statistics maintained for sinks. Gauges can be uninitialized.
SourceStatisticsMetadata
Meta data needed to maintain source statistics.
SourceStatisticsMetricDefs ๐Ÿ”’
SourceStatisticsMetrics
Prometheus metrics for user-facing source metrics.
SourceStatisticsRecord
Statistics maintained for sources. Gauges can be uninitialized.
StatsInner ๐Ÿ”’
StorageStatistics
A helper struct designed to make it easy for operators to update user-facing metrics. This struct also ensures that each stack is also incremented in prometheus.

Type Aliasesยง

SinkStatistics
Statistics maintained for sinks.
SourceStatistics
Statistics maintained for sources.