-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor: remove global metrics in store #14439
Conversation
// MeasureSince provides a wrapper functionality for emitting a a time measure | ||
// metric with global labels (if any). | ||
func (m Metrics) MeasureSince(keys ...string) { | ||
start := time.Now() |
Check warning
Code scanning / CodeQL
Calling the system time
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.
lgtm. although if we need to extract telemetry again, I still think a package would make sense.
we need to refactor how telemetry works in the sdk to spin it out. Right now it works like a global, which is fine for modules but we should define a telemetry interface as well. |
[Cosmos SDK] Kudos, SonarCloud Quality Gate passed! |
Description
this pr is a first attempt at removing the global telemetry variable from usage in store.
Changes:
@alexanderbez @julienrbrt would like to hear from you if this is a direction I should continue, I didnt complete it to not spend too much time headed in a direction where I shouldn't.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change