From 0b1e0a4299abbffe3762ed239bd55bea1ca98783 Mon Sep 17 00:00:00 2001 From: Rama Date: Thu, 11 Jan 2018 20:26:42 +0530 Subject: [PATCH 1/8] metrics service docs Signed-off-by: Rama --- api/BUILD | 1 + api/metrics_service.proto | 5 +++-- docs/build.sh | 1 + docs/root/api-v2/api.rst | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/api/BUILD b/api/BUILD index 6a638ded1..b79285355 100644 --- a/api/BUILD +++ b/api/BUILD @@ -333,6 +333,7 @@ proto_library( ":cds", ":eds", ":lds", + ":metrics", ":protocol", ":rds", ":rls", diff --git a/api/metrics_service.proto b/api/metrics_service.proto index edff678e5..71316f5c9 100644 --- a/api/metrics_service.proto +++ b/api/metrics_service.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -// [#proto-status: draft] +// [#proto-status: experimental] package envoy.api.v2; @@ -11,6 +11,7 @@ import "metrics.proto"; import "validate/validate.proto"; +// [#protodoc-title: Metrics Service] // Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric // data model as a standard to represent metrics information. service MetricsService { @@ -37,7 +38,7 @@ message StreamMetricsMessage { repeated io.prometheus.client.MetricFamily envoy_metrics = 2; } -// Configuration structure for Metrics Service. It is a :ref: `StatsSink ` +// Configuration structure for Metrics Service. It is a :ref:`StatsSink ` // opaque configuration that will be used to create Metrics Service. message MetricsServiceConfig { // The upstream gRPC cluster that hosts the metrics service. diff --git a/docs/build.sh b/docs/build.sh index 96a5f60e4..ddafb6dea 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -36,6 +36,7 @@ PROTO_RST=" /api/grpc_service/api/grpc_service.proto.rst /api/health_check/api/health_check.proto.rst /api/lds/api/lds.proto.rst + /api/metrics/api/metrics_service.proto.rst /api/rds/api/rds.proto.rst /api/rls/api/rls.proto.rst /api/sds/api/sds.proto.rst diff --git a/docs/root/api-v2/api.rst b/docs/root/api-v2/api.rst index 26611d896..4106a7655 100644 --- a/docs/root/api-v2/api.rst +++ b/docs/root/api-v2/api.rst @@ -17,6 +17,7 @@ v2 API reference rds.proto sds.proto stats.proto + metrics_service.proto trace.proto base.proto address.proto From 368315bd871783268c32fb4b55f58a1e70788c28 Mon Sep 17 00:00:00 2001 From: Rama Date: Thu, 11 Jan 2018 20:31:28 +0530 Subject: [PATCH 2/8] metrics service docs Signed-off-by: Rama --- api/metrics_service.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/metrics_service.proto b/api/metrics_service.proto index 71316f5c9..cfc149fe7 100644 --- a/api/metrics_service.proto +++ b/api/metrics_service.proto @@ -2,6 +2,8 @@ syntax = "proto3"; // [#proto-status: experimental] +// [#protodoc-title: Metrics Service] + package envoy.api.v2; import "api/base.proto"; @@ -11,7 +13,6 @@ import "metrics.proto"; import "validate/validate.proto"; -// [#protodoc-title: Metrics Service] // Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric // data model as a standard to represent metrics information. service MetricsService { From 8c8c0a7a77a8b508623005c47cbe7c7c5c2e924c Mon Sep 17 00:00:00 2001 From: Rama Date: Fri, 12 Jan 2018 15:44:08 +0530 Subject: [PATCH 3/8] addressed review comments Signed-off-by: Rama --- api/metrics_service.proto | 7 ++++--- api/stats.proto | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/api/metrics_service.proto b/api/metrics_service.proto index cfc149fe7..84035648b 100644 --- a/api/metrics_service.proto +++ b/api/metrics_service.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -// [#proto-status: experimental] +// [#proto-status: draft] // [#protodoc-title: Metrics Service] @@ -39,8 +39,9 @@ message StreamMetricsMessage { repeated io.prometheus.client.MetricFamily envoy_metrics = 2; } -// Configuration structure for Metrics Service. It is a :ref:`StatsSink ` -// opaque configuration that will be used to create Metrics Service. +// Metrics Service is configured as a built-in *envoy.metrics_service* +// :ref:`StatsSink `. This opaque configuration will be used +// to create Metrics Service. message MetricsServiceConfig { // The upstream gRPC cluster that hosts the metrics service. GrpcService grpc_service = 1 [(validate.rules).message.required = true]; diff --git a/api/stats.proto b/api/stats.proto index 95ba4e816..6db8c3437 100644 --- a/api/stats.proto +++ b/api/stats.proto @@ -15,11 +15,11 @@ import "validate/validate.proto"; // Configuration for pluggable stats sinks. message StatsSink { // The name of the stats sink to instantiate. The name must match a supported - // stats sink. *envoy.statsd* is a built-in sink suitable for emitting to - // `statsd `_. Any other built-in stats sink - // can be found in `well_known_names.h - // `_ - // in the Envoy repository. + // stats sink. The built-in stats sinks are + // + // * :ref:`envoy.statsd ` + // * :ref:`envoy.dog_statsd ` + // * :ref:`envoy.metrics_service ` string name = 1; // Stats sink specific configuration which depends on the sink being From 2530dd26efff1bad468402d9e12b701967d88556 Mon Sep 17 00:00:00 2001 From: Rama Date: Fri, 12 Jan 2018 15:49:49 +0530 Subject: [PATCH 4/8] formatted Signed-off-by: Rama --- api/metrics_service.proto | 5 ++--- api/stats.proto | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/api/metrics_service.proto b/api/metrics_service.proto index 84035648b..72439d745 100644 --- a/api/metrics_service.proto +++ b/api/metrics_service.proto @@ -39,9 +39,8 @@ message StreamMetricsMessage { repeated io.prometheus.client.MetricFamily envoy_metrics = 2; } -// Metrics Service is configured as a built-in *envoy.metrics_service* -// :ref:`StatsSink `. This opaque configuration will be used -// to create Metrics Service. +// Metrics Service is configured as a built-in *envoy.metrics_service* :ref:`StatsSink `. +// This opaque configuration will be used to create Metrics Service. message MetricsServiceConfig { // The upstream gRPC cluster that hosts the metrics service. GrpcService grpc_service = 1 [(validate.rules).message.required = true]; diff --git a/api/stats.proto b/api/stats.proto index 6db8c3437..953b7bc11 100644 --- a/api/stats.proto +++ b/api/stats.proto @@ -15,7 +15,7 @@ import "validate/validate.proto"; // Configuration for pluggable stats sinks. message StatsSink { // The name of the stats sink to instantiate. The name must match a supported - // stats sink. The built-in stats sinks are + // stats sink. The built-in stats sinks are: // // * :ref:`envoy.statsd ` // * :ref:`envoy.dog_statsd ` From d46c2d3f78d425ae9425ef696d3f1cf02e7402f2 Mon Sep 17 00:00:00 2001 From: Rama Date: Fri, 12 Jan 2018 16:59:03 +0530 Subject: [PATCH 5/8] formatted Signed-off-by: Rama --- api/metrics_service.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/metrics_service.proto b/api/metrics_service.proto index 72439d745..658051d07 100644 --- a/api/metrics_service.proto +++ b/api/metrics_service.proto @@ -39,8 +39,8 @@ message StreamMetricsMessage { repeated io.prometheus.client.MetricFamily envoy_metrics = 2; } -// Metrics Service is configured as a built-in *envoy.metrics_service* :ref:`StatsSink `. -// This opaque configuration will be used to create Metrics Service. +// Metrics Service is configured as a built-in *envoy.metrics_service* :ref:`StatsSink +// `. This opaque configuration will be used to create Metrics Service. message MetricsServiceConfig { // The upstream gRPC cluster that hosts the metrics service. GrpcService grpc_service = 1 [(validate.rules).message.required = true]; From 3b5c8e1fcf8f23f7bac797996bc580119adde04d Mon Sep 17 00:00:00 2001 From: Rama Date: Fri, 12 Jan 2018 17:08:45 +0530 Subject: [PATCH 6/8] formatted Signed-off-by: Rama --- api/metrics_service.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/metrics_service.proto b/api/metrics_service.proto index 658051d07..de658e07f 100644 --- a/api/metrics_service.proto +++ b/api/metrics_service.proto @@ -31,15 +31,15 @@ message StreamMetricsMessage { Node node = 1 [(validate.rules).message.required = true]; } - // Identifier data effectively is a structured metadata. - // As a performance optimization this will only be sent in the first message on the stream. + // Identifier data effectively is a structured metadata.As a performance optimization this will + // only be sent in the first message on the stream. Identifier identifier = 1; // A list of metric entries repeated io.prometheus.client.MetricFamily envoy_metrics = 2; } -// Metrics Service is configured as a built-in *envoy.metrics_service* :ref:`StatsSink +// Metrics Service is configured as a built-in *envoy.metrics_service* :ref:`StatsSink // `. This opaque configuration will be used to create Metrics Service. message MetricsServiceConfig { // The upstream gRPC cluster that hosts the metrics service. From bcd89bcc1dcf903bafb12ffa9584ee960c40eee0 Mon Sep 17 00:00:00 2001 From: Rama Date: Fri, 12 Jan 2018 17:35:28 +0530 Subject: [PATCH 7/8] metrics_service proto Signed-off-by: Rama --- api/metrics_service.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/metrics_service.proto b/api/metrics_service.proto index de658e07f..3f0d3e357 100644 --- a/api/metrics_service.proto +++ b/api/metrics_service.proto @@ -31,7 +31,7 @@ message StreamMetricsMessage { Node node = 1 [(validate.rules).message.required = true]; } - // Identifier data effectively is a structured metadata.As a performance optimization this will + // Identifier data effectively is a structured metadata.As a performance optimization this will // only be sent in the first message on the stream. Identifier identifier = 1; From ab0aa7c703a77f668a35d954e4e7a3dd1a1404f5 Mon Sep 17 00:00:00 2001 From: Rama Date: Fri, 12 Jan 2018 21:33:07 +0530 Subject: [PATCH 8/8] add missing space Signed-off-by: Rama --- api/metrics_service.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/metrics_service.proto b/api/metrics_service.proto index 3f0d3e357..0d82a076d 100644 --- a/api/metrics_service.proto +++ b/api/metrics_service.proto @@ -31,7 +31,7 @@ message StreamMetricsMessage { Node node = 1 [(validate.rules).message.required = true]; } - // Identifier data effectively is a structured metadata.As a performance optimization this will + // Identifier data effectively is a structured metadata. As a performance optimization this will // only be sent in the first message on the stream. Identifier identifier = 1;