StateAdditionalStatsStore

A singleton class responsible for managing additional state statistics, specifically histograms of metrics associated with partitions and destination streams. This class provides methods to add metrics values, retrieve combined statistics, and maintain metrics completeness with default values.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard

Enum representing the available observability metrics. Each metric is associated with a specific metric name used for tracking system behavior and performance.

Functions

Link copied to clipboard

Adds a value to the histogram associated with the given partition and stream descriptor for the specified metric.

Link copied to clipboard

Drains the accumulated statistics for the specified destination stream across the provided partition keys, returning a combined histogram of all relevant metrics. For any metric values not present, default values are added. This is to ensure that the metrics are always published as part of the state message with a zero value if no value has been recorded since the last state message publish event.