-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix kubeletstats logging and self reported metrics #357
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
Conversation
Kubeletstats receiver was missing log statements on important errors.
Codecov Report
@@ Coverage Diff @@
## master #357 +/- ##
==========================================
+ Coverage 82.78% 82.83% +0.04%
==========================================
Files 170 170
Lines 9070 9075 +5
==========================================
+ Hits 7509 7517 +8
+ Misses 1236 1234 -2
+ Partials 325 324 -1
Continue to review full report at Codecov.
|
const transport = "http" | ||
ctx := obsreport.StartMetricsReceiveOp(r.ctx, dataformat, transport) | ||
ctx := obsreport.ReceiverContext(r.ctx, typeStr, transport, r.receiverName) | ||
ctx = obsreport.StartMetricsReceiveOp(ctx, typeStr, transport) |
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.
Ifaik StartMetricsReceiveOp
calls must always match with EndMetricsReceiveOp
. So we shouldn't put EndMetricsReceiveOp
under a condition. I don't think we need StartMetricsReceiveOp
call here. We probably only need only one StartMetricsReceiveOp
call and one EndMetricsReceiveOp
call in this function, both of them should wrap err = r.consumer.ConsumeMetricsData(ctx, *md)
in every iteration of the loop over MetricsData.
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.
Agreed, will fix.
* Add logging on errors in Runnable Kubeletstats receiver was missing log statements on important errors. * Fix self reported metrics * Fix obsreport calls
Kubeletstats receiver was missing log statements on important errors and self-reported metrics was not working in lab.
Tested self-reported metrics by looking at prometheus endpoint at 8888.