metrics service: allow only histogram summaries (#25812)

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>

Mirrored from https://github.com/envoyproxy/envoy @ c40aca4c1b51f2089fd33e70b393041c6b291064
pull/626/head
data-plane-api(Azure Pipelines) 2 years ago
parent b88832427b
commit 9e0602b523
  1. 16
      envoy/config/metrics/v3/metrics_service.proto

@ -19,6 +19,18 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Metrics service] // [#protodoc-title: Metrics service]
// HistogramEmitMode is used to configure which metric types should be emitted for histograms.
enum HistogramEmitMode {
// Emit Histogram and Summary metric types.
SUMMARY_AND_HISTOGRAM = 0;
// Emit only Summary metric types.
SUMMARY = 1;
// Emit only Histogram metric types.
HISTOGRAM = 2;
}
// Metrics Service is configured as a built-in ``envoy.stat_sinks.metrics_service`` :ref:`StatsSink // Metrics Service is configured as a built-in ``envoy.stat_sinks.metrics_service`` :ref:`StatsSink
// <envoy_v3_api_msg_config.metrics.v3.StatsSink>`. This opaque configuration will be used to create // <envoy_v3_api_msg_config.metrics.v3.StatsSink>`. This opaque configuration will be used to create
// Metrics Service. // Metrics Service.
@ -34,6 +46,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// transport_api_version: V3 // transport_api_version: V3
// //
// [#extension: envoy.stat_sinks.metrics_service] // [#extension: envoy.stat_sinks.metrics_service]
// [#next-free-field: 6]
message MetricsServiceConfig { message MetricsServiceConfig {
option (udpa.annotations.versioning).previous_message_type = option (udpa.annotations.versioning).previous_message_type =
"envoy.config.metrics.v2.MetricsServiceConfig"; "envoy.config.metrics.v2.MetricsServiceConfig";
@ -55,4 +68,7 @@ message MetricsServiceConfig {
// and the tag extracted name will be used instead of the full name, which may contain values used by the tag // and the tag extracted name will be used instead of the full name, which may contain values used by the tag
// extractor or additional tags added during stats creation. // extractor or additional tags added during stats creation.
bool emit_tags_as_labels = 4; bool emit_tags_as_labels = 4;
// Specify which metrics types to emit for histograms. Defaults to SUMMARY_AND_HISTOGRAM.
HistogramEmitMode histogram_emit_mode = 5 [(validate.rules).enum = {defined_only: true}];
} }

Loading…
Cancel
Save