-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tracking: refactor metrics with LabelGuarded
#14838
Comments
LabelGuarded
LabelGuarded
Could be related: #13086 |
related #14821 |
So currently when a streaming job is dropped, it's metrics will be leaked (i.e., prometheus collected some useless data, which is always zero valued), right? |
True. Part of them have been fixed (for example, check the |
I have observed some non-zero constant values on the Grafana, although I am not sure if it is the same root cause |
Yes, should be constant. Not necessarily zero. Can examine by checking |
Background
LabelGuardedMetricVec
was introduced in #13080. It enhances theMetricVec
to ensure the set of labels to be correctly removed from the Prometheus client once being dropped. This is useful for metrics that are associated with an object that can be dropped, such as streaming jobs, fragments, actors, batch tasks, etc.When a set labels is dropped, it will record it in the
uncollected_removed_labels
set. Once the metrics has been collected, it will finally remove the metrics of the labels.To-dos
Technically, all usages of plain
MetricVec
of a drop-able object (streaming jobs, fragments, actors, batch tasks, etc.) need to be replaced withLabelGuardedMetricVec
StreamingMetrics
withLabelGuarded
ones #16728SourceMetrics
withLabelGuarded
ones #16729SinkMetrics
withLabelGuarded
oneswith_label_values
withLabelGuardedXxx
#15475RdKafkaStats
with Guarded metrics #18433The text was updated successfully, but these errors were encountered: