1syntax = "proto3"; 2 3package envoy.config.endpoint.v3; 4 5import "envoy/config/core/v3/address.proto"; 6import "envoy/config/core/v3/base.proto"; 7 8import "google/protobuf/duration.proto"; 9import "google/protobuf/struct.proto"; 10 11import "udpa/annotations/status.proto"; 12import "udpa/annotations/versioning.proto"; 13import "validate/validate.proto"; 14 15option java_package = "io.envoyproxy.envoy.config.endpoint.v3"; 16option java_outer_classname = "LoadReportProto"; 17option java_multiple_files = true; 18option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3;endpointv3"; 19option (udpa.annotations.file_status).package_version_status = ACTIVE; 20 21// [#protodoc-title: Load Report] 22 23// These are stats Envoy reports to the management server at a frequency defined by 24// :ref:`LoadStatsResponse.load_reporting_interval<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.load_reporting_interval>`. 25// Stats per upstream region/zone and optionally per subzone. 26// [#next-free-field: 9] 27message UpstreamLocalityStats { 28 option (udpa.annotations.versioning).previous_message_type = 29 "envoy.api.v2.endpoint.UpstreamLocalityStats"; 30 31 // Name of zone, region and optionally endpoint group these metrics were 32 // collected from. Zone and region names could be empty if unknown. 33 core.v3.Locality locality = 1; 34 35 // The total number of requests successfully completed by the endpoints in the 36 // locality. 37 uint64 total_successful_requests = 2; 38 39 // The total number of unfinished requests 40 uint64 total_requests_in_progress = 3; 41 42 // The total number of requests that failed due to errors at the endpoint, 43 // aggregated over all endpoints in the locality. 44 uint64 total_error_requests = 4; 45 46 // The total number of requests that were issued by this Envoy since 47 // the last report. This information is aggregated over all the 48 // upstream endpoints in the locality. 49 uint64 total_issued_requests = 8; 50 51 // Stats for multi-dimensional load balancing. 52 repeated EndpointLoadMetricStats load_metric_stats = 5; 53 54 // Endpoint granularity stats information for this locality. This information 55 // is populated if the Server requests it by setting 56 // :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`. 57 repeated UpstreamEndpointStats upstream_endpoint_stats = 7; 58 59 // [#not-implemented-hide:] The priority of the endpoint group these metrics 60 // were collected from. 61 uint32 priority = 6; 62} 63 64// [#next-free-field: 8] 65message UpstreamEndpointStats { 66 option (udpa.annotations.versioning).previous_message_type = 67 "envoy.api.v2.endpoint.UpstreamEndpointStats"; 68 69 // Upstream host address. 70 core.v3.Address address = 1; 71 72 // Opaque and implementation dependent metadata of the 73 // endpoint. Envoy will pass this directly to the management server. 74 google.protobuf.Struct metadata = 6; 75 76 // The total number of requests successfully completed by the endpoints in the 77 // locality. These include non-5xx responses for HTTP, where errors 78 // originate at the client and the endpoint responded successfully. For gRPC, 79 // the grpc-status values are those not covered by total_error_requests below. 80 uint64 total_successful_requests = 2; 81 82 // The total number of unfinished requests for this endpoint. 83 uint64 total_requests_in_progress = 3; 84 85 // The total number of requests that failed due to errors at the endpoint. 86 // For HTTP these are responses with 5xx status codes and for gRPC the 87 // grpc-status values: 88 // 89 // - DeadlineExceeded 90 // - Unimplemented 91 // - Internal 92 // - Unavailable 93 // - Unknown 94 // - DataLoss 95 uint64 total_error_requests = 4; 96 97 // The total number of requests that were issued to this endpoint 98 // since the last report. A single TCP connection, HTTP or gRPC 99 // request or stream is counted as one request. 100 uint64 total_issued_requests = 7; 101 102 // Stats for multi-dimensional load balancing. 103 repeated EndpointLoadMetricStats load_metric_stats = 5; 104} 105 106message EndpointLoadMetricStats { 107 option (udpa.annotations.versioning).previous_message_type = 108 "envoy.api.v2.endpoint.EndpointLoadMetricStats"; 109 110 // Name of the metric; may be empty. 111 string metric_name = 1; 112 113 // Number of calls that finished and included this metric. 114 uint64 num_requests_finished_with_metric = 2; 115 116 // Sum of metric values across all calls that finished with this metric for 117 // load_reporting_interval. 118 double total_metric_value = 3; 119} 120 121// Per cluster load stats. Envoy reports these stats a management server in a 122// :ref:`LoadStatsRequest<envoy_v3_api_msg_service.load_stats.v3.LoadStatsRequest>` 123// Next ID: 7 124// [#next-free-field: 7] 125message ClusterStats { 126 option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.endpoint.ClusterStats"; 127 128 message DroppedRequests { 129 option (udpa.annotations.versioning).previous_message_type = 130 "envoy.api.v2.endpoint.ClusterStats.DroppedRequests"; 131 132 // Identifier for the policy specifying the drop. 133 string category = 1 [(validate.rules).string = {min_len: 1}]; 134 135 // Total number of deliberately dropped requests for the category. 136 uint64 dropped_count = 2; 137 } 138 139 // The name of the cluster. 140 string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; 141 142 // The eds_cluster_config service_name of the cluster. 143 // It's possible that two clusters send the same service_name to EDS, 144 // in that case, the management server is supposed to do aggregation on the load reports. 145 string cluster_service_name = 6; 146 147 // Need at least one. 148 repeated UpstreamLocalityStats upstream_locality_stats = 2 149 [(validate.rules).repeated = {min_items: 1}]; 150 151 // Cluster-level stats such as total_successful_requests may be computed by 152 // summing upstream_locality_stats. In addition, below there are additional 153 // cluster-wide stats. 154 // 155 // The total number of dropped requests. This covers requests 156 // deliberately dropped by the drop_overload policy and circuit breaking. 157 uint64 total_dropped_requests = 3; 158 159 // Information about deliberately dropped requests for each category specified 160 // in the DropOverload policy. 161 repeated DroppedRequests dropped_requests = 5; 162 163 // Period over which the actual load report occurred. This will be guaranteed to include every 164 // request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy 165 // and the ``LoadStatsResponse`` message sent from the management server, this may be longer than 166 // the requested load reporting interval in the ``LoadStatsResponse``. 167 google.protobuf.Duration load_report_interval = 4; 168} 169