github.com/kiali/kiali@v1.84.0/tracing/tempo/tempopb/tempo.proto (about) 1 syntax="proto3"; 2 3 package tempopb; 4 5 import "trace/v1/trace.proto"; 6 import "common/v1/common.proto"; 7 import "github.com/gogo/protobuf/gogoproto/gogo.proto"; 8 9 service Pusher { 10 // different versions of PushBytes expect the trace data to be pushed in different formats 11 rpc PushBytes(PushBytesRequest) returns (PushResponse) {}; // ./pkg/model/v1 12 rpc PushBytesV2(PushBytesRequest) returns (PushResponse) {}; // ./pkg/model/v2 13 } 14 15 service MetricsGenerator { 16 rpc PushSpans(PushSpansRequest) returns (PushResponse) {}; 17 rpc GetMetrics(SpanMetricsRequest) returns (SpanMetricsResponse) {}; 18 } 19 20 service Querier { 21 rpc FindTraceByID(TraceByIDRequest) returns (TraceByIDResponse) {}; 22 rpc SearchRecent(SearchRequest) returns (SearchResponse) {}; 23 rpc SearchBlock(SearchBlockRequest) returns (SearchResponse) {}; 24 rpc SearchTags(SearchTagsRequest) returns (SearchTagsResponse) {}; 25 rpc SearchTagsV2(SearchTagsRequest) returns (SearchTagsV2Response) {}; 26 rpc SearchTagValues(SearchTagValuesRequest) returns (SearchTagValuesResponse) {}; 27 rpc SearchTagValuesV2(SearchTagValuesRequest) returns (SearchTagValuesV2Response) {}; 28 // rpc SpanMetricsSummary(SpanMetricsSummaryRequest) returns (SpanMetricsSummaryResponse) {}; 29 } 30 31 service StreamingQuerier { 32 rpc Search(SearchRequest) returns (stream SearchResponse); 33 } 34 35 service Metrics { 36 rpc SpanMetricsSummary(SpanMetricsSummaryRequest) returns (SpanMetricsSummaryResponse) {} 37 } 38 39 // Read 40 message TraceByIDRequest { 41 bytes traceID = 1; 42 string blockStart = 2; 43 string blockEnd = 3; 44 string queryMode = 5; 45 } 46 47 message TraceByIDResponse { 48 Trace trace = 1; 49 TraceByIDMetrics metrics = 2; 50 } 51 52 message TraceByIDMetrics { 53 } 54 55 // SearchRequest takes no block parameters and implies a "recent traces" search 56 message SearchRequest { 57 // case insensitive partial match 58 map<string, string> Tags = 1 [(gogoproto.nullable) = false]; 59 uint32 MinDurationMs = 2; 60 uint32 MaxDurationMs = 3; 61 uint32 Limit = 4; 62 uint32 start = 5; 63 uint32 end = 6; 64 // TraceQL query 65 string Query = 8; 66 uint32 SpansPerSpanSet = 9; 67 } 68 69 // SearchBlockRequest takes SearchRequest parameters as well as all information necessary 70 // to search a block in the backend. 71 message SearchBlockRequest { 72 SearchRequest searchReq = 1; 73 string blockID = 2; 74 uint32 startPage = 3; 75 uint32 pagesToSearch = 4; 76 string encoding = 5; 77 uint32 indexPageSize = 6; 78 uint32 totalRecords = 7; 79 string dataEncoding = 8; 80 string version = 9; 81 uint64 size = 10; // total size of data file 82 uint32 footerSize = 11; // size of file footer (parquet) 83 repeated DedicatedColumn dedicatedColumns = 12; 84 } 85 86 // Configuration for a single dedicated attribute column. 87 message DedicatedColumn { 88 enum Scope { 89 SPAN = 0; 90 RESOURCE = 1; 91 } 92 enum Type { 93 STRING = 0; 94 } 95 Scope scope = 3; 96 string name = 2; 97 Type type = 1; 98 } 99 100 message SearchResponse { 101 repeated TraceSearchMetadata traces = 1; 102 SearchMetrics metrics = 2; 103 } 104 105 message TraceSearchMetadata { 106 string traceID = 1; 107 string rootServiceName = 2; 108 string rootTraceName = 3; 109 uint64 startTimeUnixNano = 4; 110 uint32 durationMs = 5; 111 SpanSet spanSet = 6; // deprecated. use SpanSets field below 112 repeated SpanSet spanSets = 7; 113 } 114 115 message SpanSet { 116 repeated Span spans = 1; 117 uint32 matched = 2; 118 repeated tempopb.common.v1.KeyValue attributes = 3; 119 } 120 121 message Span { 122 string spanID = 1; 123 string name = 2; 124 uint64 startTimeUnixNano = 3; 125 uint64 durationNanos = 4; 126 repeated tempopb.common.v1.KeyValue attributes = 5; 127 } 128 129 message SearchMetrics { 130 uint32 inspectedTraces = 1; 131 uint64 inspectedBytes = 2; 132 uint32 totalBlocks = 3; 133 uint32 completedJobs = 4; 134 uint32 totalJobs = 5; 135 uint64 totalBlockBytes = 6; 136 } 137 138 message SearchTagsRequest { 139 string scope = 1; 140 } 141 142 message SearchTagsResponse { 143 repeated string tagNames = 1; 144 } 145 146 message SearchTagsV2Response { 147 repeated SearchTagsV2Scope scopes = 1; 148 } 149 150 message SearchTagsV2Scope { 151 string name = 1; 152 repeated string tags = 2; 153 } 154 155 message SearchTagValuesRequest { 156 string tagName = 1; 157 string query = 2; // TraceQL query 158 } 159 160 message SearchTagValuesResponse { 161 repeated string tagValues = 1; 162 } 163 164 message TagValue { 165 string type = 1; 166 string value = 2; 167 } 168 169 message SearchTagValuesV2Response { 170 repeated TagValue tagValues = 1; 171 } 172 173 message Trace { 174 repeated tempopb.trace.v1.ResourceSpans batches = 1; 175 } 176 177 // Write 178 message PushResponse { 179 } 180 181 // PushBytesRequest pushes slices of traces, ids and searchdata. Traces are encoded using the 182 // current BatchDecoder in ./pkg/model 183 message PushBytesRequest { 184 // pre-marshalled Traces. length must match ids 185 repeated bytes traces = 2 [(gogoproto.nullable) = false, (gogoproto.customtype) = "PreallocBytes"]; 186 // trace ids. length must match traces 187 repeated bytes ids = 3 [(gogoproto.nullable) = false, (gogoproto.customtype) = "PreallocBytes"]; 188 // search data, length must match traces 189 repeated bytes searchData = 4 [(gogoproto.nullable) = false, (gogoproto.customtype) = "PreallocBytes"]; 190 } 191 192 message PushSpansRequest { 193 // just send entire OTel spans for now 194 repeated tempopb.trace.v1.ResourceSpans batches = 1; 195 } 196 197 message TraceBytes { 198 // pre-marshalled Traces 199 repeated bytes traces = 1; 200 } 201 202 // this message exists for marshalling/unmarshalling convenience to/from parquet. in parquet we proto encode 203 // links to a column. unfortunately you can't encode a slice directly so we use this wrapper to generate 204 // the required marshalling/unmarshalling functions. 205 message LinkSlice { 206 repeated tempopb.trace.v1.Span.Link links = 1; 207 } 208 209 message SpanMetricsRequest { 210 string query = 1; 211 string groupBy = 2; 212 uint64 limit = 3; 213 uint32 start = 4; 214 uint32 end = 5; 215 } 216 217 message SpanMetricsSummaryRequest { 218 string query = 1; 219 string groupBy = 2; 220 uint64 limit = 3; 221 uint32 start = 4; 222 uint32 end = 5; 223 } 224 225 message SpanMetricsResponse { 226 bool estimated = 1; 227 uint64 spanCount = 2; 228 uint64 errorSpanCount = 3; 229 repeated SpanMetrics metrics = 4; 230 } 231 232 message RawHistogram { 233 uint64 bucket = 1; 234 uint64 count = 2; 235 } 236 237 message KeyValue { 238 string key = 1; 239 TraceQLStatic value = 2; 240 } 241 242 message SpanMetrics { 243 repeated RawHistogram latency_histogram = 1; 244 repeated KeyValue series = 2; 245 uint64 errors = 3; 246 } 247 248 message SpanMetricsSummary { 249 uint64 spanCount = 1; 250 uint64 errorSpanCount = 2; 251 repeated KeyValue series = 3; 252 uint64 p99 = 4; 253 uint64 p95 = 5; 254 uint64 p90 = 6; 255 uint64 p50 = 7; 256 } 257 258 message SpanMetricsSummaryResponse { 259 repeated SpanMetricsSummary summaries = 1; 260 } 261 262 message TraceQLStatic { 263 int32 type = 1; 264 int64 n = 2; 265 double f = 3; 266 string s = 4; 267 bool b = 5; 268 uint64 d = 6; 269 int32 status = 7; 270 int32 kind = 8; 271 }