Skip to content

metrics service: allow only histogram summaries#25812

Merged
jmarantz merged 17 commits intoenvoyproxy:mainfrom
sschepens:metrics-service-allow-only-histogram-summaries
Apr 6, 2023
Merged

metrics service: allow only histogram summaries#25812
jmarantz merged 17 commits intoenvoyproxy:mainfrom
sschepens:metrics-service-allow-only-histogram-summaries

Conversation

@sschepens
Copy link
Copy Markdown
Contributor

Commit Message: Allow only histogram summaries in metric service
Additional Description: Histogram metrics by default send two metrics Summary (containing quantiles) and Histogram (containing all the buckets), this makes payloads extremely large when handling lots of stats. In some cases, only having the summary is enough, since we can get sum, count, and percentiles. Furthermore, it probably only makes sense to send one of both, if I were to need buckets, then Summary is probably useless.
Risk Level: low, off by default
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy[\w/]*/(v1alpha\d?|v1|v2alpha\d?|v2))|(api/envoy/type/(matcher/)?\w+.proto).
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @markdroth
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #25812 was opened by sschepens.

see: more, trace.

@sschepens sschepens force-pushed the metrics-service-allow-only-histogram-summaries branch from 8129c15 to 221dbd7 Compare February 28, 2023 13:21
@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Feb 28, 2023
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/runtime-guard-changes: FYI only for changes made to (source/common/runtime/runtime_features.cc).
CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @mattklein123

🐱

Caused by: #25812 was synchronize by sschepens.

see: more, trace.

@sschepens sschepens force-pushed the metrics-service-allow-only-histogram-summaries branch from 221dbd7 to 971c188 Compare February 28, 2023 13:23
Copy link
Copy Markdown
Contributor

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

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

should we have some tests for this new mode?

@sschepens
Copy link
Copy Markdown
Contributor Author

should we have some tests for this new mode?

yes! on it

@sschepens sschepens force-pushed the metrics-service-allow-only-histogram-summaries branch from 55600a4 to c123e6e Compare February 28, 2023 22:59
@sschepens
Copy link
Copy Markdown
Contributor Author

@jmarantz pushed a new implementation using an enum to allow specifying which metrics you want emitted, also added tests for this.
The only thing i'm not sure is if protobuf defaults to the enum value 0 when not specified or if we need some other sort of default.

@sschepens sschepens force-pushed the metrics-service-allow-only-histogram-summaries branch from 965a75f to bd75374 Compare March 1, 2023 17:08
@mattklein123
Copy link
Copy Markdown
Member

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #25812 (comment) was created by @mattklein123.

see: more, trace.

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

API LGTM. Please add a release note. I will defer to @jmarantz for code review. Thank you!

@mattklein123 mattklein123 assigned jmarantz and unassigned markdroth Mar 2, 2023
@sschepens sschepens removed the request for review from lizan March 7, 2023 12:56
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
@sschepens
Copy link
Copy Markdown
Contributor Author

added changelog and merged main

Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
jmarantz
jmarantz previously approved these changes Apr 5, 2023
Copy link
Copy Markdown
Contributor

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

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

I think you need to merge main again to get rid of the spurious arm64 CI failure, which was a flake I think.

lizan
lizan previously approved these changes Apr 5, 2023
Copy link
Copy Markdown
Member

@lizan lizan left a comment

Choose a reason for hiding this comment

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

can you resolve conflicts? defer to @jmarantz to merge.

@repokitteh-read-only repokitteh-read-only bot removed the api label Apr 5, 2023
@jmarantz
Copy link
Copy Markdown
Contributor

jmarantz commented Apr 5, 2023

@sschepens you might be interested in this related issue: #11259

I have a skeletal draft PR #26472 which exposes raw histogram bins as an admin endpoint via json. It might be interesting to also access those via metrics service API, which would add a new enum choice to what you have here.

@jmarantz
Copy link
Copy Markdown
Contributor

jmarantz commented Apr 5, 2023

/wait (for main merge)

…ow-only-histogram-summaries

Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
@sschepens sschepens dismissed stale reviews from lizan and jmarantz via 811f13b April 5, 2023 14:16
@repokitteh-read-only repokitteh-read-only bot added api and removed waiting labels Apr 5, 2023
@jmarantz
Copy link
Copy Markdown
Contributor

jmarantz commented Apr 6, 2023

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Check envoy-presubmit isn't fully completed, but will still attempt retrying.
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #25812 (comment) was created by @jmarantz.

see: more, trace.

@jmarantz jmarantz dismissed mattklein123’s stale review April 6, 2023 14:34

I think what was requested was for me to review.

@jmarantz jmarantz merged commit c40aca4 into envoyproxy:main Apr 6, 2023
RiverPhillips pushed a commit to RiverPhillips/envoy that referenced this pull request Apr 7, 2023
Commit Message: Allow only histogram summaries in metric service
Additional Description: Histogram metrics by default send two metrics Summary (containing quantiles) and Histogram (containing all the buckets), this makes payloads extremely large when handling lots of stats. In some cases, only having the summary is enough, since we can get sum, count, and percentiles. Furthermore, it probably only makes sense to send one of both, if I were to need buckets, then Summary is probably useless.
Risk Level: low, off by default
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:

Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
Signed-off-by: River Phillips <riverphillips1@gmail.com>
@sschepens sschepens deleted the metrics-service-allow-only-histogram-summaries branch April 10, 2023 13:33
jmarantz pushed a commit that referenced this pull request 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 pull request 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

api deps Approval required for changes to Envoy's external dependencies v2-freeze

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants