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

prometheus: fix copying of metrics labels #4450

Merged
merged 1 commit into from
Nov 30, 2023
Merged

prometheus: fix copying of metrics labels #4450

merged 1 commit into from
Nov 30, 2023

Conversation

sustrik
Copy link
Contributor

@sustrik sustrik commented Nov 30, 2023

When copying metric labels we assumed that append will always create a copy of the label array. This is not necessarily the case. In such case two metrics may end up with the same underlaying array of labels and change to one of them also overwrites the labels in the other one.


This change is Reviewable

When copying metric labels we assumed that `append` will always
create a copy of the label array. This is not necessarily the case.
In such case two metrics may end up with the same underlaying
array of labels and change to one of them also overwrites the
labels in the other one.
Copy link
Contributor

@matzf matzf left a comment

Choose a reason for hiding this comment

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

Classic. 😉

:lgtm:

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @sustrik)

@matzf matzf merged commit 7fc08e4 into scionproto:master Nov 30, 2023
1 check passed
juagargi pushed a commit to netsec-ethz/scion that referenced this pull request Mar 8, 2024
When copying metric labels we assumed that `append` will always
create a copy of the label array. This is not necessarily the case.
In such case two metrics may end up with the same underlaying
array of labels and change to one of them also overwrites the
labels in the other one.
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