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

Method Combine

modules/frontend/combiner/response_metrics.go:19–27  ·  view source on GitHub ↗
(newMetrics *tempopb.SearchMetrics, resp PipelineResponse)

Source from the content-addressed store, hash-verified

17}
18
19func (mc *SearchMetricsCombiner) Combine(newMetrics *tempopb.SearchMetrics, resp PipelineResponse) {
20 if newMetrics != nil {
21 mc.Metrics.CompletedJobs++
22 if !IsCacheHit(resp.HTTPResponse()) {
23 mc.Metrics.InspectedTraces += newMetrics.InspectedTraces
24 mc.Metrics.InspectedBytes += newMetrics.InspectedBytes
25 }
26 }
27}
28
29func (mc *SearchMetricsCombiner) CombineMetadata(newMetrics *tempopb.SearchMetrics, _ PipelineResponse) {
30 // These "Total" metrics are calculated by the frontend in the sharder.

Callers 1

NewSearchFunction · 0.95

Calls 2

IsCacheHitFunction · 0.85
HTTPResponseMethod · 0.65

Tested by

no test coverage detected