-
Notifications
You must be signed in to change notification settings - Fork 41
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: register the metrics with manager #220
Conversation
e35b09a
to
e3553d8
Compare
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.
Let's address the linters complains, and let's add // nolint:gochecknoinits
and // nolint:gochecknoglobals
.
I know this is out of the scope of this PR, however, I got a question since you're the author of the following: Why are we hard-coding the status code to be 200? This could be misleading since if I'm unauthenticated, I'm expecting 403.
|
@prometherion The status code is not getting hardcoded and it will always be the same as the status code returned handler. we are creating a response writer with the below statement and this response writer is getting passed to handlers in the chain which will be updating the status code to be same as what is returned by the handler and we are passing the updated status code to Prometheus metrics labels, the 200 is put just to create a response writer with a valid HTTP status code. |
e3553d8
to
46b5925
Compare
46b5925
to
386b89a
Compare
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.
Thanks for the kind explanation of this PR, LGTM, and astonishing work! 🚀
No description provided.