From 573cbd81360e6241681c30cab6bcbf194ab0fe13 Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Tue, 4 Dec 2018 00:22:28 +0000 Subject: [PATCH] api: Add a metadata field to UpstreamEndpointStats. (#5154) Description: This field is used to carry opaque and implementation dependent information of the upstream endpoints. The information may be used by management server for debugging purposes. Example: Consider a requirement of per 'user' load stastics for debugging. Envoy will embed user info into the metadata field for every upstream endpoint it sends load to. This user information will be used by management server for debugging. Sample message: message ClusterStats { cluster_name = ... message UpstreamLocalityStats { locality = ... message UpstreamEndpointStats { address = "endpoint1" metadata = { "user" : "alice"} ... } message UpstreamEndpointStats { address = "endpoint1" metadata = { "user" : "bob"} ... } message UpstreamEndpointStats { address = "endpoint2" metadata = { "user" : "alice"} ... } message UpstreamEndpointStats { address = "endpoint3" metadata = { "user" : "bob"} ... } } } Risk Level: Low Testing: Compiles successfully. Signed-off-by: Karthik Reddy Mirrored from https://github.com/envoyproxy/envoy @ 8d8cb4a7c63b74633b0b459af9104143b13f657f --- envoy/api/v2/endpoint/load_report.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/envoy/api/v2/endpoint/load_report.proto b/envoy/api/v2/endpoint/load_report.proto index 3a78bc05..608bce8c 100644 --- a/envoy/api/v2/endpoint/load_report.proto +++ b/envoy/api/v2/endpoint/load_report.proto @@ -6,6 +6,7 @@ import "envoy/api/v2/core/address.proto"; import "envoy/api/v2/core/base.proto"; import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; import "validate/validate.proto"; import "gogoproto/gogo.proto"; @@ -57,6 +58,10 @@ message UpstreamEndpointStats { // Upstream host address. core.Address address = 1; + // Opaque and implementation dependent metadata of the + // endpoint. Envoy will pass this directly to the management server. + google.protobuf.Struct metadata = 6; + // The total number of requests successfully completed by the endpoint. A // single HTTP or gRPC request or stream is counted as one request. A TCP // connection is also treated as one request. There is no explicit