Expand description
Per-node metric handles for native PromQL execution and their DataFusion registration.
Node metrics retain no names or tree topology: NodeMetrics::register names the handles for
one registration, and the set holds them from there. What outlives an execution is therefore its
counters and gauges, not the nodes that recorded them.
The name carries the nodeโs position in the runtime tree: the whole native tree registers into
the one [ExecutionPlanMetricsSet] the enclosing physical operator (FusedSeriesExec) owns, and
the reader aggregates by name, so two nodes of a kind sharing
a name would be summed into a single figure. What a consumer can rely on is the grammar
native.<path>.<metric> with the suffixes of NodeMetric::ALL: splitting off the final
component leaves the metric, and the path before it keys the node within that operator. That key
is promised only inside the topology that produced it:
- the path names a node of one runtime topology;
- queries, plan rewrites, and versions move it, so it is neither a persisted nor a public identifier;
peak_reserved_bytesalone carriesp<partition>, because the reader sums gauges by name and a sum of peaks is not a peak.
Structsยง
- Node
Metric - The metric names one node reports.
- Node
Metrics - The metric handles one node updates as it runs.
- Node
Metrics Snapshot - The figures every node of one execution left, keyed by the path it was registered under.
Constantsยง
- NATIVE_
PREFIX ๐ - The reserved first segment of every native metric name.
Functionsยง
- is_
node_ metric - Whether
nameis a figure a node of a native tree reports, rather than one of an operator. - named ๐
- The full metric name for
metricreported by the node calledname. - node_
metric_ ๐order - Where
metricsits in the declared order, so a nodeโs figures read the same on every node and on every run. - partitioned ๐
- The full metric name for
metricinpartitionof the node calledname. - split_
name ๐ - Splits a registered metric name into the node path and the figure it reports.