Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: add env to disable metrics operation when it is disabled #96
feat: add env to disable metrics operation when it is disabled #96
Changes from 33 commits
2f3b6aa
6feb607
9fa07f2
f50590b
a9546e6
65958fc
f1eda9a
9766160
4ab9f9c
1900257
3f6e629
1297dc2
41c342f
7f622c6
d97f8c7
25c1213
f13e41f
44cb8a9
60e55ed
25cd2fd
a37ea53
849c8d0
28bdc4b
afa086d
6ac2ee2
461c9fc
1e4f891
b05ed6d
7ffbc0e
5d429f0
77f20a4
2f34eed
29f31e2
36049ba
d1ea3cb
74142d0
46912b6
c242326
9220e53
cd9b0d0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
nitpick: any reason we don't want to return an explicit error rather than a silent 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.
Yeh, this is to avoid refactoring. The implementation we have in not methods-based, but expects that we pass the db. To remove db dependency during initialization we return not fake, but nil db and pass it. As it is expected (and added to the comments), we allow to pass db as nil. In such case we don't need errors.
Another ways to do that:
empty
implementation, that does nothingThis helps us to keep the current metrics in the code, while we don't have the decision about about how do we want to implement metrics
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.
There is an additional further PR (already created), that we discussed with @pirtleshell and in the task: https://app.shortcut.com/kava-labs/story/14336
This one provide a better refactoring, adding interfaces.