You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
143511: metric: add static labels to metric metadata r=angles-n-daemons a=dhartunian
Previously, it was not possible to emit metrics with static labels that were known at startup. Labels would need to be dynamically added after `Metadata` was constructed. This made it difficult to define groups of metrics with the same name but different labels.
This commit adds two new fields to the `metric.Metadata` struct, which are meant to enable a backwards-compatible transition to labeled metrics from today's definitions which reify the label values into the metric name.
The Prometheus export code is modified to accept a flag that governs whether static labels are requested. If so, the labeled name of the metric be used if available.
A future PR will add a `/metrics` endpoint that is like `/_status/ vars` except that it will emit the static label version of metrics when they have those definitions available.
Part of: #142570
Release note: None
Co-authored-by: David Hartunian <[email protected]>
0 commit comments