MCPcopy
hub / github.com/grafana/tempo / Combine

Method Combine

pkg/traceql/combine.go:344–368  ·  view source on GitHub ↗
(resp *tempopb.QueryRangeResponse)

Source from the content-addressed store, hash-verified

342}
343
344func (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
370func (q *QueryRangeCombiner) Response() *tempopb.QueryRangeResponse {
371 response := &tempopb.QueryRangeResponse{

Callers

nothing calls this directly

Calls 2

ObserveSeriesMethod · 0.80
LengthMethod · 0.65

Tested by

no test coverage detected