NodeMetrics
The gauges of a node that are read, not heard, set in meters from each of the node's samples (sampler):
WowMetrics.PARKED_AGGREGATES: how many entries each subscription of each group has parked, as the node's ledgers list them (ServiceNode.parked), counted up to the sampler's cap (
wow.node.max-parked): a count past it reads as the cap, so a flood of parked entries costs one bounded read per sample, shared with the node's health. The ledgers are the service's, shared by its nodes, so one node reports them (reportsParked): the one that runs partition 0 of the service's first log group (by context name), or every node of a service without one. Summed across nodes, the count is the service's once.WowMetrics.POSITION, WowMetrics.BACKLOG and WowMetrics.PROGRESS: for each subscription of each log group, in each partition it runs on this node (me.ahoo.wow.runtime.subscription.SubscriptionRuntime.positions), its watermark, the entries of the log after it, and the watermark over the log's head: how far a rebuild (a subscription under a new name, from the beginning) has come.
WowMetrics.PAUSED_PARTITIONS and WowMetrics.THROTTLED_PARTITIONS: for each subscription of each log group that runs here, and each intake or other context's topic that has one (
ServiceNode.pauses,ServiceNode.throttled), how many of its partitions on this node it has paused on a systemic failure, or throttles on backpressure: 0 while it runs them all, so one series per subscription, not one per partition.WowMetrics.EXECUTOR_IN_FLIGHT, WowMetrics.EXECUTOR_LANES and WowMetrics.APPEND_QUEUE_DEPTH, per context: the commands in its executor, the aggregates with commands in flight, and the appends queued on its partitions, which show a store slowing down before the node refuses commands as busy.
WowMetrics.ACCESS_WALK_PENDING and WowMetrics.ACCESS_WALK_WALKED, per context and aggregate type: 1 while the access walk of the type its log records has not completed, and the aggregates it has stamped, as this node last read it (me.ahoo.wow.runtime.access.AccessWalking.walks): every node reads the one record, so each reports the same.
A gauge a sample no longer takes (a partition handed off to another node, the parked count of a node that no longer reports it) is removed from meters, so it does not report its last value forever.
The sampler's owner starts and closes it; these gauges follow each of its samples.
Functions
Whether this node reports the service's parked entries: it runs partition 0 of the service's first log group, by context name, so one node of the service does at a time; every node of a service without a log group does.
Takes one sample of the node (NodeSampler.sample), which sets every gauge.