-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Improvement: add metrics to prom client #4556
Improvement: add metrics to prom client #4556
Conversation
ecdb2e8
to
86ae555
Compare
41512ba
to
9e7cf44
Compare
Add pkg/extprom/http/instrument_client.go with code to instrument an http client. thanos-io#4545 Signed-off-by: Kevin Hellemun <[email protected]>
9e7cf44
to
e29d4b9
Compare
Signed-off-by: Kevin Hellemun <[email protected]>
Signed-off-by: Kevin Hellemun <[email protected]>
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! I love it. LGTM, just one minor nit.
By using a standard metric name, this makes templating and dashboard generation easier. A label has been added to indicate which client the http client metrics are about. thanos-io#4545 Signed-off-by: Kevin Hellemun <[email protected]>
The metrics now look like this:
|
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.
Sweet, all good except two nits. Good job!
Signed-off-by: Kevin Hellemun <[email protected]>
Retried, will monitor if this time e2e fails again or not. |
* Improvement: add metrics to prom client Add pkg/extprom/http/instrument_client.go with code to instrument an http client. thanos-io#4545 Signed-off-by: Kevin Hellemun <[email protected]> * Add doc blocks. Signed-off-by: Kevin Hellemun <[email protected]> * Fix lint issues. Signed-off-by: Kevin Hellemun <[email protected]> * Use a standard metric name. By using a standard metric name, this makes templating and dashboard generation easier. A label has been added to indicate which client the http client metrics are about. thanos-io#4545 Signed-off-by: Kevin Hellemun <[email protected]> * Add missing labels, help and parse annotation. Signed-off-by: Kevin Hellemun <[email protected]>
This pr add
pkg/extprom/http/instrument_client.go
with code to instrument an HTTP client.The approach is to add metrics clients to the HTTP config.
Not sure if this is the right approach or if another clever design can be used, this was the most obvious and backward compatible way I could come up with.
fixes: #4545
Signed-off-by: Kevin Hellemun [email protected]
Changes
Verification