-
Notifications
You must be signed in to change notification settings - Fork 209
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: Set first retrieved metrics to 0 if absent #1864
metrics: Set first retrieved metrics to 0 if absent #1864
Conversation
924c162
to
a15d5c1
Compare
a15d5c1
to
12809ee
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 good to me overall.
One minor nit (https://github.com/cilium/cilium-cli/pull/1864/files#r1276205954) and one issue with the log package
12809ee
to
7d6644a
Compare
7d6644a
to
b76e763
Compare
b76e763
to
c45b2b5
Compare
c45b2b5
to
d36b8dd
Compare
When a cluster is freshly deployed and no traffic was observed, certain metrics does not appear yet. This commit intents to assume the default value of the counters is 0 the counters if the metric is absent. Signed-off-by: Donia Chaiehloudj <[email protected]>
d36b8dd
to
975bc08
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.
thank you! 🥰
When a cluster is freshly deployed and no traffic was observed, certain metrics does not appear yet. This commit intents to set to 0 the counters of the MetricFamily if the metric was not present.
Testing on a fresh cluster:
No metrics at the beginning, set to 0:
Finally checked the metrics properly: