load_report.proto 6.3 KB

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