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
feat(agent):metrics for errors in agent #3449
Conversation
@istae @vladopajic ci errs unrelated to 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.
Nice work, small suggestions :)
pkg/storageincentives/metrics.go
Outdated
ErrCheckIsPlaying: prometheus.NewCounter(prometheus.CounterOpts{ | ||
Namespace: m.Namespace, | ||
Subsystem: subsystem, | ||
Name: "neighborhoodSelected_errors", |
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.
rename to is_playing_errors
// total calls to chain backend | ||
BackendCalls prometheus.Counter | ||
BackendErrors prometheus.Counter |
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.
Ideally these should be exposed by ChainBackend
interface (or any other type wrapping this interface in order to provide this this functionality.
Ideally metrics should be defined and calculated inside the same scope where logic (which is being measured) is defined. That is, if measured function is
Having this practice enables more robust code because code using |
makes sense, thankyou, will keep it in mind. |
Checklist
Description
Adds metrics for errors for Grafana dashboard
Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
An extension of Agent feature in storage incentives.
Related Issue (Optional)
NA
Screenshots (if appropriate):
This change is