Metrics service (proto)
config.metrics.v3.MetricsServiceConfig
[config.metrics.v3.MetricsServiceConfig proto]
Metrics Service is configured as a built-in envoy.stat_sinks.metrics_service StatsSink. This opaque configuration will be used to create
Metrics Service.
Example:
stats_sinks:
- name: envoy.stat_sinks.metrics_service
typed_config:
"@type": type.googleapis.com/envoy.config.metrics.v3.MetricsServiceConfig
This extension has the qualified name envoy.stat_sinks.metrics_service
Note
This extension does not operate on the data plane and hence is intended to be robust against untrusted traffic.
Tip
This extension extends and can be used with the following extension category:
This extension must be configured with one of the following type URLs:
{
"grpc_service": {...},
"transport_api_version": ...,
"report_counters_as_deltas": {...},
"emit_tags_as_labels": ...,
"histogram_emit_mode": ...,
"batch_size": ...
}
- grpc_service
(config.core.v3.GrpcService, REQUIRED) The upstream gRPC cluster that hosts the metrics service.
- transport_api_version
(config.core.v3.ApiVersion) API version for metric service transport protocol. This describes the metric service gRPC endpoint and version of messages used on the wire.
- report_counters_as_deltas
(BoolValue) If true, counters are reported as the delta between flushing intervals. Otherwise, the current counter value is reported. Defaults to false. Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the sink will take updates from the MetricsResponse.
- emit_tags_as_labels
(bool) If true, metrics will have their tags emitted as labels on the metrics objects sent to the MetricsService, 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.
- histogram_emit_mode
(config.metrics.v3.HistogramEmitMode) Specify which metrics types to emit for histograms. Defaults to SUMMARY_AND_HISTOGRAM.
- batch_size
(uint32) The maximum number of metrics to send in a single gRPC message. If not set or set to 0, all metrics will be sent in a single message (current behavior). When set to a positive value, metrics will be batched into multiple messages, with each message containing at most batch_size metric families. This helps avoid hitting gRPC message size limits (typically 4MB) when sending large numbers of metrics.
Enum config.metrics.v3.HistogramEmitMode
[config.metrics.v3.HistogramEmitMode proto]
HistogramEmitMode is used to configure which metric types should be emitted for histograms.
- SUMMARY_AND_HISTOGRAM
(DEFAULT) Emit Histogram and Summary metric types.
- SUMMARY
Emit only Summary metric types.
- HISTOGRAM
Emit only Histogram metric types.