Skip to content
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

Add optional prometheus metrics #2391

Merged
merged 1 commit into from
Jul 8, 2022
Merged

Add optional prometheus metrics #2391

merged 1 commit into from
Jul 8, 2022

Conversation

ozamosi
Copy link
Contributor

@ozamosi ozamosi commented Jul 1, 2022

If we want to be able to confidently refactor and improve the
application, then we need to keep metrics on before and after. This
may or may not be useful to end-users, but I definitely want this in
our staging cluster, and turning it on might help debugging user
environments.

This pulls in a 3rd party middleware to gather RED style metrics about
all of our endpoints - I see a histogram
http_request_duration_seconds that is labeled by handler, method,
and response code, I see a http_requests_inflight gauge labeled by
handler, and a http_response_size_bytes histogram labeled by
handler, method, and response code. This is an excellent start - I'd
want the same RED metrics for k8s client requests themselves, but that
can be a later problem.

This resolves #2347.

@ozamosi ozamosi requested a review from SamLR July 1, 2022 12:49
@ozamosi ozamosi added the type/enhancement New feature or request label Jul 1, 2022
@ozamosi ozamosi force-pushed the prom-endpoint branch 4 times, most recently from dd90ab1 to 88a7150 Compare July 5, 2022 16:28
If we want to be able to confidently refactor and improve the
application, then we need to keep metrics on before and after. This
may or may not be useful to end-users, but I definitely want this in
our staging cluster, and turning it on might help debugging user
environments.

This pulls in a 3rd party middleware to gather RED style metrics about
all of our endpoints - I see a histogram
`http_request_duration_seconds` that is labeled by handler, method,
and response code, I see a `http_requests_inflight` gauge labeled by
handler, and a `http_response_size_bytes` histogram labeled by
handler, method, and response code. This is an excellent start - I'd
want the same RED metrics for k8s client requests themselves, but that
can be a later problem.

This resolves #2347.
Copy link
Contributor

@opudrovs opudrovs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ozamosi ozamosi merged commit 57f064b into main Jul 8, 2022
@ozamosi ozamosi deleted the prom-endpoint branch July 8, 2022 16:35
This was referenced Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export metrics for request duration
2 participants