metrics service sink: add config option to report counters as deltas (#10889)

Description: this PR adds the ability to configure the metrics service stats sink to report counters as deltas between flushing intervals. This is the expected representation for some stats aggregations backends. Similar behavior is seen, for instance, in the statsd sink.
Risk Level: low, previous behavior is left unchanged, and is the default.
Testing: updated unit test.
Docs Changes: left comments in the field definition
Release Notes: updated version history.

Signed-off-by: Jose Nino <jnino@lyft.com>

Mirrored from https://github.com/envoyproxy/envoy @ 048f4231310fbbead0cbe03d43ffb4307fff0517
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent d90d431899
commit 0365877d8e
  1. 8
      envoy/config/metrics/v3/metrics_service.proto

@ -4,6 +4,8 @@ package envoy.config.metrics.v3;
import "envoy/config/core/v3/grpc_service.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
@ -25,4 +27,10 @@ message MetricsServiceConfig {
// The upstream gRPC cluster that hosts the metrics service.
core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
// 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 :ref:`MetricsResponse <envoy_api_msg_service.metrics.v3.StreamMetricsResponse>`.
google.protobuf.BoolValue report_counters_as_deltas = 2;
}

Loading…
Cancel
Save