github.com/thanos-io/thanos@v0.32.5/pkg/exemplars/exemplarspb/rpc.proto (about)

     1  // Copyright (c) The Thanos Authors.
     2  // Licensed under the Apache License 2.0.
     3  
     4  syntax = "proto3";
     5  package thanos;
     6  
     7  import "store/storepb/types.proto";
     8  import "store/labelpb/types.proto";
     9  import "gogoproto/gogo.proto";
    10  
    11  option go_package = "exemplarspb";
    12  
    13  option (gogoproto.sizer_all) = true;
    14  option (gogoproto.marshaler_all) = true;
    15  option (gogoproto.unmarshaler_all) = true;
    16  option (gogoproto.goproto_getters_all) = false;
    17  
    18  // Do not generate XXX fields to reduce memory footprint and opening a door
    19  // for zero-copy casts to/from prometheus data types.
    20  option (gogoproto.goproto_unkeyed_all) = false;
    21  option (gogoproto.goproto_unrecognized_all) = false;
    22  option (gogoproto.goproto_sizecache_all) = false;
    23  
    24  /// Exemplars represents API that is responsible for gathering exemplars and their states.
    25  service Exemplars {
    26      /// Exemplars has info for all exemplars.
    27      /// Returned exemplars are expected to include external labels.
    28      rpc Exemplars(ExemplarsRequest) returns (stream ExemplarsResponse);
    29  }
    30  
    31  message ExemplarsRequest {
    32      string query = 1;
    33      int64 start = 2;
    34      int64 end = 3;
    35      PartialResponseStrategy partial_response_strategy = 4;
    36  }
    37  
    38  message ExemplarsResponse {
    39      oneof result {
    40          ExemplarData data = 1;
    41          string warning = 2;
    42      }
    43  }
    44  
    45  message ExemplarData {
    46      ZLabelSet seriesLabels = 1 [(gogoproto.jsontag) = "seriesLabels", (gogoproto.nullable) = false];
    47      repeated Exemplar exemplars = 2 [(gogoproto.jsontag) = "exemplars"];
    48  }
    49  
    50  message Exemplar {
    51      ZLabelSet labels = 1 [(gogoproto.jsontag) = "labels", (gogoproto.nullable) = false];
    52      double value = 2 [(gogoproto.jsontag) = "value"];
    53      int64 ts = 3 [(gogoproto.jsontag) = "timestamp"];
    54  }