(resp *tempopb.QueryRangeResponse)
| 342 | } |
| 343 | |
| 344 | func (q *QueryRangeCombiner) Combine(resp *tempopb.QueryRangeResponse) { |
| 345 | if resp == nil || q.maxSeriesReached { |
| 346 | return |
| 347 | } |
| 348 | |
| 349 | // Here is where the job results are reentered into the pipeline |
| 350 | q.eval.ObserveSeries(resp.Series) |
| 351 | seriesCount := q.eval.Length() |
| 352 | |
| 353 | if (q.maxSeries > 0 && seriesCount >= q.maxSeries) || resp.Status == tempopb.PartialStatus_PARTIAL { |
| 354 | q.maxSeriesReached = true |
| 355 | } |
| 356 | |
| 357 | // TODO: this is here only for the querier |
| 358 | // we want to use the metrics combiner from the frontend |
| 359 | if resp.Metrics != nil { |
| 360 | q.metrics.TotalJobs += resp.Metrics.TotalJobs |
| 361 | q.metrics.TotalBlocks += resp.Metrics.TotalBlocks |
| 362 | q.metrics.TotalBlockBytes += resp.Metrics.TotalBlockBytes |
| 363 | q.metrics.InspectedBytes += resp.Metrics.InspectedBytes |
| 364 | q.metrics.InspectedTraces += resp.Metrics.InspectedTraces |
| 365 | q.metrics.InspectedSpans += resp.Metrics.InspectedSpans |
| 366 | q.metrics.CompletedJobs += resp.Metrics.CompletedJobs |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | func (q *QueryRangeCombiner) Response() *tempopb.QueryRangeResponse { |
| 371 | response := &tempopb.QueryRangeResponse{ |
nothing calls this directly
no test coverage detected