metrics_service.proto 1.5 KB

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