-
Notifications
You must be signed in to change notification settings - Fork 418
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
Pinned Metrics #1922
Pinned Metrics #1922
Conversation
pm, err := p.source.GetPinnedMetrics() | ||
if err != nil { | ||
return | ||
} |
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.
If errors lead to not updating the values and otherwise ignore them (which is fine), can we write the code in a way like:
- If GetMetrics() succeeds, perform updates. Otherwise skip updates.
- If GetPinnedMetrics() succeeds, perform updates. Otherwise skip updates.
This extends the old behaviour to more blocks
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.
you mean like this? (see latest commit)
Or do you mean: if one of them errors, update nothing
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.
Exactly, I like. If no updates are coming to prometheus you can do the debugging. No need for an hard exit here.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1922 +/- ##
==========================================
- Coverage 54.69% 54.67% -0.02%
==========================================
Files 65 65
Lines 9859 9865 +6
==========================================
+ Hits 5392 5394 +2
- Misses 3919 3923 +4
Partials 548 548
|
related to #1912