From 7c94d79c9760d9a20f00cc00a4936a84a10e360e Mon Sep 17 00:00:00 2001 From: Akhil Thampy Date: Wed, 4 Apr 2018 12:16:32 -0500 Subject: [PATCH 1/6] stats: add prefix to StatsConfig Signed-off-by: Akhil Thampy --- envoy/config/metrics/v2/stats.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/envoy/config/metrics/v2/stats.proto b/envoy/config/metrics/v2/stats.proto index b29f9d08d..721e9b445 100644 --- a/envoy/config/metrics/v2/stats.proto +++ b/envoy/config/metrics/v2/stats.proto @@ -155,6 +155,7 @@ message StatsdSink { // Envoy will connect to this cluster to flush statistics. string tcp_cluster_name = 2; } + string prefix = 3; } // Stats configuration proto schema for built-in *envoy.dog_statsd* sink. From 0e3e80280e194e7e490710412c25c4183acf2fbd Mon Sep 17 00:00:00 2001 From: Akhil Thampy Date: Wed, 4 Apr 2018 16:12:45 -0500 Subject: [PATCH 2/6] stats: Add documentation for prefix Signed-off-by: Akhil Thampy --- envoy/config/metrics/v2/stats.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/envoy/config/metrics/v2/stats.proto b/envoy/config/metrics/v2/stats.proto index 721e9b445..84b6d3266 100644 --- a/envoy/config/metrics/v2/stats.proto +++ b/envoy/config/metrics/v2/stats.proto @@ -155,6 +155,8 @@ message StatsdSink { // Envoy will connect to this cluster to flush statistics. string tcp_cluster_name = 2; } + // [#not-implemented-hide:] Optional custom prefix for StatsdSink. If + // specified, this will override the default prefix. string prefix = 3; } From 59efd253639fe07b02b1c139f0afdbc18741871b Mon Sep 17 00:00:00 2001 From: Akhil Thampy Date: Mon, 9 Apr 2018 11:05:43 -0500 Subject: [PATCH 3/6] stats: add example for prefix Signed-off-by: Akhil Thampy --- envoy/config/metrics/v2/stats.proto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/envoy/config/metrics/v2/stats.proto b/envoy/config/metrics/v2/stats.proto index 84b6d3266..936db0194 100644 --- a/envoy/config/metrics/v2/stats.proto +++ b/envoy/config/metrics/v2/stats.proto @@ -157,6 +157,14 @@ message StatsdSink { } // [#not-implemented-hide:] Optional custom prefix for StatsdSink. If // specified, this will override the default prefix. + // For example: + // .. code-block:: json + // prefix : "envoy-prod" + // will change emitted stats to + // .. code-block:: cpp + // envoy-prod.test_counter:1|c + // envoy-prod.test_timer:5|ms + string prefix = 3; } From 085caeee892ffc6990fecbc3e49e23094cd37026 Mon Sep 17 00:00:00 2001 From: Akhil Thampy Date: Mon, 9 Apr 2018 20:16:43 -0500 Subject: [PATCH 4/6] stats: document default prefix Signed-off-by: Akhil Thampy --- envoy/config/metrics/v2/stats.proto | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/envoy/config/metrics/v2/stats.proto b/envoy/config/metrics/v2/stats.proto index 936db0194..ad29a8fde 100644 --- a/envoy/config/metrics/v2/stats.proto +++ b/envoy/config/metrics/v2/stats.proto @@ -164,6 +164,13 @@ message StatsdSink { // .. code-block:: cpp // envoy-prod.test_counter:1|c // envoy-prod.test_timer:5|ms + // + // Note that the default prefix, "envoy", will be used if a prefix is not + // specified. + // Stats with default prefix: + // .. code-block:: cpp + // envoy.test_counter:1|c + // envoy.test_timer:5|ms string prefix = 3; } From 085b5ed7e684eebb1f450ffc03b40fc7e568b0eb Mon Sep 17 00:00:00 2001 From: Akhil Thampy Date: Mon, 9 Apr 2018 20:50:52 -0500 Subject: [PATCH 5/6] stats: fix format Signed-off-by: Akhil Thampy --- envoy/config/metrics/v2/stats.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envoy/config/metrics/v2/stats.proto b/envoy/config/metrics/v2/stats.proto index ad29a8fde..a7c11a40e 100644 --- a/envoy/config/metrics/v2/stats.proto +++ b/envoy/config/metrics/v2/stats.proto @@ -166,7 +166,7 @@ message StatsdSink { // envoy-prod.test_timer:5|ms // // Note that the default prefix, "envoy", will be used if a prefix is not - // specified. + // specified. // Stats with default prefix: // .. code-block:: cpp // envoy.test_counter:1|c From 084251158f7d0ce3e492cf8ee42e85c4c31b2ab7 Mon Sep 17 00:00:00 2001 From: Akhil Thampy Date: Tue, 10 Apr 2018 14:44:14 -0500 Subject: [PATCH 6/6] stats: fix prefix documentation Signed-off-by: Akhil Thampy --- envoy/config/metrics/v2/stats.proto | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/envoy/config/metrics/v2/stats.proto b/envoy/config/metrics/v2/stats.proto index a7c11a40e..7aab95a43 100644 --- a/envoy/config/metrics/v2/stats.proto +++ b/envoy/config/metrics/v2/stats.proto @@ -158,20 +158,29 @@ message StatsdSink { // [#not-implemented-hide:] Optional custom prefix for StatsdSink. If // specified, this will override the default prefix. // For example: + // // .. code-block:: json - // prefix : "envoy-prod" + // + // { + // "prefix" : "envoy-prod" + // } + // // will change emitted stats to + // // .. code-block:: cpp + // // envoy-prod.test_counter:1|c // envoy-prod.test_timer:5|ms // // Note that the default prefix, "envoy", will be used if a prefix is not // specified. + // // Stats with default prefix: + // // .. code-block:: cpp + // // envoy.test_counter:1|c // envoy.test_timer:5|ms - string prefix = 3; }