Skip to content
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

Merged
merged 4 commits into from
Jul 4, 2024
Merged

Pinned Metrics #1922

merged 4 commits into from
Jul 4, 2024

Conversation

chipshort
Copy link
Collaborator

related to #1912

@chipshort chipshort requested review from webmaster128 and pinosu July 3, 2024 14:42
pm, err := p.source.GetPinnedMetrics()
if err != nil {
return
}
Copy link
Member

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:

  1. If GetMetrics() succeeds, perform updates. Otherwise skip updates.
  2. If GetPinnedMetrics() succeeds, perform updates. Otherwise skip updates.

This extends the old behaviour to more blocks

Copy link
Collaborator Author

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

Copy link
Member

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.

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 12.50000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 54.67%. Comparing base (8171d65) to head (b3e8552).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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              
Files Coverage Δ
x/wasm/types/wasmer_engine.go 0.00% <ø> (ø)
x/wasm/keeper/metrics.go 47.05% <12.50%> (-2.95%) ⬇️

@chipshort chipshort merged commit 9aaeff8 into main Jul 4, 2024
16 of 17 checks passed
@chipshort chipshort deleted the co/pinned-metrics branch July 4, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants