otlp_stats_sink: add stats prefix config option (#29204)

Adds a config option to set a stat prefix for all stats flushed by the otlp stats sink. Resolves #28962.

Risk Level: low
Testing: Unit tests, integration tests
Docs Changes: API docs

Signed-off-by: ohadvano <ohadvano@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ a19966b92bc3afcdd68ebeffe53c4b6848733e79
main
update-envoy[bot] 1 year ago
parent 82f2350bc3
commit 44c869b441
  1. 8
      envoy/extensions/stat_sinks/open_telemetry/v3/open_telemetry.proto

@ -19,7 +19,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// Stats configuration proto schema for ``envoy.stat_sinks.open_telemetry`` sink.
// [#extension: envoy.stat_sinks.open_telemetry]
// [#next-free-field: 6]
// [#next-free-field: 7]
message SinkConfig {
oneof protocol_specifier {
option (validate.required) = true;
@ -44,4 +44,10 @@ message SinkConfig {
// If set to true, metric names will be represented as the tag extracted name instead
// of the full metric name. Default value is true.
google.protobuf.BoolValue use_tag_extracted_name = 5;
// If set, emitted stats names will be prepended with a prefix, so full stat name will be
// <prefix>.<stats_name>. For example, if the stat name is "foo.bar" and prefix is
// "pre", the full stat name will be "pre.foo.bar". If this field is not set, there is no
// prefix added. According to the example, the full stat name will remain "foo.bar".
string prefix = 6;
}

Loading…
Cancel
Save