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

Support prometheus summary metric types on the admin endpoint #30471

Closed
andybradshaw opened this issue Oct 24, 2023 · 2 comments · Fixed by #30479
Closed

Support prometheus summary metric types on the admin endpoint #30471

andybradshaw opened this issue Oct 24, 2023 · 2 comments · Fixed by #30479
Labels
enhancement Feature requests. Not bugs or questions. stale stalebot believes this issue/PR has not been touched recently

Comments

@andybradshaw
Copy link
Contributor

Support prometheus summary metric types on the admin endpoint: The prometheus stats admin endpoint currently supports histograms based on the statically configured buckets, but doesn't support quantile-based summaries

Description:
The prometheus stats endpoint currently only returns histogram metrics for the configured buckets. A potentially more useful way of reporting these would be to use the histogram quantiles and report as a prometheus "summary" metric type. There is some prior art in controlling how histograms are reported (#25812), which could be supported with a query param.

Current behavior:

~ > curl http://127.0.0.1:9901/stats/prometheus
# TYPE envoy_server_initialization_time_ms histogram
envoy_server_initialization_time_ms_bucket{le="0.5"} 0
envoy_server_initialization_time_ms_bucket{le="1"} 0
envoy_server_initialization_time_ms_bucket{le="5"} 0
...
envoy_server_initialization_time_ms_bucket{le="1800000"} 1
envoy_server_initialization_time_ms_bucket{le="3600000"} 1
envoy_server_initialization_time_ms_bucket{le="+Inf"} 1
envoy_server_initialization_time_ms_sum{} 165
envoy_server_initialization_time_ms_count{} 1

Intended Change:

~ > curl http://127.0.0.1:9901/stats/prometheus?histogram_emit_mode=summary
# TYPE envoy_server_initialization_time_ms summary
envoy_server_initialization_time_ms{quantile="0"} 160
envoy_server_initialization_time_ms{quantile="0.25"} 162.5
envoy_server_initialization_time_ms{quantile="0.5"} 165
...
envoy_server_initialization_time_ms{quantile="0.995"} 169.95
envoy_server_initialization_time_ms{quantile="0.999"} 169.99
envoy_server_initialization_time_ms{quantile="1"} 170
envoy_server_initialization_time_ms_sum{} 165
envoy_server_initialization_time_ms_count{} 1
@andybradshaw andybradshaw added enhancement Feature requests. Not bugs or questions. triage Issue requires triage labels Oct 24, 2023
@alyssawilk alyssawilk removed the triage Issue requires triage label Oct 25, 2023
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Nov 24, 2023
Copy link

github-actions bot commented Dec 1, 2023

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
jmarantz pushed a commit that referenced this issue Apr 1, 2024
Commit Message: Add support for prometheus summary metrics on the admin endpoint
Additional Description: Adds support emitting prometheus "summary" metrics for the internal histogram quantiles by supplying a query parameter. Multiple modes are supported, as in #25812, and can be either histogram, summary, or histogram,summary.
Risk Level: Low, no changes to existing default behavior
Testing: Added unit tests for histogram, summary, and summary+histogram emission
Docs Changes: Added documentation to the admin home page, and to the published admin docs around an optional query parameter.
Release Notes: Added a note in the small_feature section.

Fixes #30471

Signed-off-by: Andy Bradshaw <abradshaw@palantir.com>
alyssawilk pushed a commit to alyssawilk/envoy that referenced this issue Apr 29, 2024
Commit Message: Add support for prometheus summary metrics on the admin endpoint
Additional Description: Adds support emitting prometheus "summary" metrics for the internal histogram quantiles by supplying a query parameter. Multiple modes are supported, as in envoyproxy#25812, and can be either histogram, summary, or histogram,summary.
Risk Level: Low, no changes to existing default behavior
Testing: Added unit tests for histogram, summary, and summary+histogram emission
Docs Changes: Added documentation to the admin home page, and to the published admin docs around an optional query parameter.
Release Notes: Added a note in the small_feature section.

Fixes envoyproxy#30471

Signed-off-by: Andy Bradshaw <abradshaw@palantir.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests. Not bugs or questions. stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants