-
Notifications
You must be signed in to change notification settings - Fork 46
refactor: refactor metronome metrics with consistent tags #1241
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
Conversation
029d917
to
31aefea
Compare
c2f38a1
to
d522585
Compare
@@ -93,6 +94,9 @@ func SchemaUpdateRepaired(project string, branch string, collection string) { | |||
} | |||
|
|||
func InitializeMetrics() func() { |
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.
How can this called twice?
server/metrics/metrics.go
Outdated
@@ -93,6 +94,9 @@ func SchemaUpdateRepaired(project string, branch string, collection string) { | |||
} | |||
|
|||
func InitializeMetrics() func() { | |||
if metricsInitialized { |
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.
What about instead of this do,
var once sync.Once
InitializeMetrics() func() {
once.Do(func() {})
}
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.
I added a mutex, which is basically the same as what this does internally. We need to pass io.Closer
outside.
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 can have io.Closer outside of Do()
2f138e5
to
4c52891
Compare
4c52891
to
0f4294c
Compare
0f4294c
to
e6de963
Compare
* refactor: refactor metronome metrics with consistent tags (#1241) * feat: Implemented API key authentication mechanism * fix: Fixed marshaling based on code review suggestion * feat: Added whoami endpoint * refactor: minor refactor based on code review comments --------- Co-authored-by: Peter Boros <[email protected]>
🎉 This PR is included in version 1.0.0-beta.112 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Describe your changes
Refactor metronome metrics to be in-line with the rest and make sure tags won't be different in the same scope.
Right now the new metrics are additional to the old, one, needs to be deleted.
How best to test these changes
Check the metronome alerts in dev.
Issue ticket number and link
TIG-1549