-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
metrics: fix issue where logging err/warn metric is never updated. #29201
Conversation
ae43425
to
44783b7
Compare
44783b7
to
34d045c
Compare
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.
Looks reasonable. Might be worth using a gauge for the metric, since it's never going to be changed after initialization, but that's orthogonal to this PR>
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 for this! Minus the double invoke, LGTM.
34d045c
to
3b27a37
Compare
3b27a37
to
b0700c0
Compare
/test |
1 similar comment
/test |
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.
LGTM 💯
Because legacy metrics are now initialized in Hive, the logging hook was being set to the NoOpCounterVec instance. This moves initializing the errors/warnings metric out of the NewLegacyMetrics function and provides a manual way to init metrics that must be initialized prior to Hive. Fixes: cilium#29525 Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
This comment is over 5 years old and no longer seems relevant. Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
b0700c0
to
2370974
Compare
/test |
Because legacy metrics are now initialized in Hive, the logging hook was being set to the NoOpCounterVec instance.
This moves initializing the errors/warnings metric out of the NewLegacyMetrics function and provides a manual way to init metrics that must be initialized prior to Hive.