Skip to content

Check if labelvalues is in _metrics before deletion in MetricWrapperBase.remove()#1077

Merged
csmarchbanks merged 1 commit intoprometheus:masterfrom
GlorifiedPig:master
Dec 6, 2024
Merged

Check if labelvalues is in _metrics before deletion in MetricWrapperBase.remove()#1077
csmarchbanks merged 1 commit intoprometheus:masterfrom
GlorifiedPig:master

Conversation

@GlorifiedPig
Copy link
Contributor

Currently raises an error if labelvalues is not in _metrics. Since the labelvalues get removed anyways, there isn't really any point of this error, since we would want to assume that after running this function call labelvalues will not exist regardless of it existed beforehand or not.

Signed-off-by: GlorifiedPig <ryan@glorifiedstudios.com>
Copy link
Member

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a reasonable quality of life improvement. Thanks!

@csmarchbanks csmarchbanks merged commit 92b2397 into prometheus:master Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments