-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[receiver/dockerstats] Fix ToMetricLabels behaviour #21160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Is there some other work needed? I fear it is getting stale 😕 |
I am rerunning your failing test run, approved and marked the PR as ready to merge. |
Only one label/envVar was added even if multiple ones were specified by ContainerLabelsToMetricLabels or EnvVarsToMetricLabels. Adding a local variable shadowing the loop one solves the issue. Signed-off-by: paologallinaharbur <paologallina1992@gmail.com>
ec5730f
to
db08c45
Compare
Thanks, @atoulme, I force-pushed to rebase and trigger tests execution again, but I've not changed the code. |
…1160) Only one label/envVar was added even if multiple ones were specified by ContainerLabelsToMetricLabels or EnvVarsToMetricLabels. Adding a local variable shadowing the loop one solves the issue. Signed-off-by: paologallinaharbur <paologallina1992@gmail.com>
Description:
Only one label/envVar was added even if multiple ones were specified
by ContainerLabelsToMetricLabels or EnvVarsToMetricLabels.
Adding a local variable shadowing the loop one solves the issue.
Without such fix the
label
variable assumes the value of the last element computed in the loop.More details can be find reading #21113
Link to tracking Issue:
Fix #21113
Testing:
The tests that were already existing have been updated to cover the broken use-case