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

Method QueryRange

modules/livestore/live_store.go:893–903  ·  modules/livestore/live_store.go::LiveStore.QueryRange

QueryRange implements tempopb.MetricsServer

(ctx context.Context, req *tempopb.QueryRangeRequest)

Source from the content-addressed store, hash-verified

891
892// QueryRange implements tempopb.MetricsServer
893func (s *LiveStore) QueryRange(ctx context.Context, req *tempopb.QueryRangeRequest) (*tempopb.QueryRangeResponse, error) {
894 return withInstance(ctx, s, func(inst *instance) (*tempopb.QueryRangeResponse, error) {
895 if s.isLagged(int64(req.End)) { // end param is already nanos, no need to convert
896 metricLaggedRequests.WithLabelValues("/tempopb.Metrics/QueryRange").Inc()
897 if s.cfg.FailOnHighLag {
898 return nil, errLagged
899 }
900 }
901 return inst.QueryRange(ctx, req)
902 })
903}
904
905var errLagged = errors.New("cannot guarantee complete results")
906

Callers

nothing calls this directly

Calls 4

isLaggedMethod · 0.95
withInstanceFunction · 0.85
IncMethod · 0.65
QueryRangeMethod · 0.65

Tested by

no test coverage detected