metrics_service.proto 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. syntax = "proto3";
  2. package envoy.service.metrics.v3;
  3. import "envoy/config/core/v3/base.proto";
  4. import "io/prometheus/client/metrics.proto";
  5. import "udpa/annotations/status.proto";
  6. import "udpa/annotations/versioning.proto";
  7. import "validate/validate.proto";
  8. option java_package = "io.envoyproxy.envoy.service.metrics.v3";
  9. option java_outer_classname = "MetricsServiceProto";
  10. option java_multiple_files = true;
  11. option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/metrics/v3;metricsv3";
  12. option java_generic_services = true;
  13. option (udpa.annotations.file_status).package_version_status = ACTIVE;
  14. // [#protodoc-title: Metrics service]
  15. // Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric
  16. // data model as a standard to represent metrics information.
  17. service MetricsService {
  18. // Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any
  19. // response to be sent as nothing would be done in the case of failure.
  20. rpc StreamMetrics(stream StreamMetricsMessage) returns (StreamMetricsResponse) {
  21. }
  22. }
  23. message StreamMetricsResponse {
  24. option (udpa.annotations.versioning).previous_message_type =
  25. "envoy.service.metrics.v2.StreamMetricsResponse";
  26. }
  27. message StreamMetricsMessage {
  28. option (udpa.annotations.versioning).previous_message_type =
  29. "envoy.service.metrics.v2.StreamMetricsMessage";
  30. message Identifier {
  31. option (udpa.annotations.versioning).previous_message_type =
  32. "envoy.service.metrics.v2.StreamMetricsMessage.Identifier";
  33. // The node sending metrics over the stream.
  34. config.core.v3.Node node = 1 [(validate.rules).message = {required: true}];
  35. }
  36. // Identifier data effectively is a structured metadata. As a performance optimization this will
  37. // only be sent in the first message on the stream.
  38. Identifier identifier = 1;
  39. // A list of metric entries
  40. repeated io.prometheus.client.MetricFamily envoy_metrics = 2;
  41. }