Skip to content
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

Improve the way of updating metrics collectors' labelsets #629

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

miklezzzz
Copy link
Contributor

@miklezzzz miklezzzz commented Jul 15, 2024

Overview

The pr updates the way new labelset are applied to metrics collectors. Also, a collector is updated only if a new metric's labelset isn't a subset of the collector's labelset (there is/are new label(s) on the metric).

What this PR does / why we need it

When a metric is saved, it is checked that the metric's labels are a subset of the corresponding collector (if there is any) and if it isn't the case, the collector's labelset and stored metrics' labelsets are updated according to a new labelset (previous labels plus new labels from the metric about to store).
New labelsets for metrics collectors are sorted before applying.

Special notes for your reviewer

Signed-off-by: Mikhail Scherba <[email protected]>
@miklezzzz miklezzzz added the enhancement New feature or request label Jul 15, 2024
@miklezzzz miklezzzz requested a review from yalosev July 15, 2024 11:14
@miklezzzz miklezzzz self-assigned this Jul 15, 2024
@yalosev yalosev merged commit 79b188e into main Jul 15, 2024
13 checks passed
@yalosev yalosev deleted the improve-collector-label-update branch July 15, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants