load_report.proto 6.5 KB

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