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

Method maxDuration

modules/frontend/search_sharder.go:271–279  ·  view source on GitHub ↗

maxDuration returns the max search duration allowed for this tenant.

(tenantID string)

Source from the content-addressed store, hash-verified

269
270// maxDuration returns the max search duration allowed for this tenant.
271func (s *asyncSearchSharder) maxDuration(tenantID string) time.Duration {
272 // check overrides first, if no overrides then grab from our config
273 maxDuration := s.overrides.MaxSearchDuration(tenantID)
274 if maxDuration != 0 {
275 return maxDuration
276 }
277
278 return s.cfg.MaxDuration
279}
280
281// backendRange returns a new start/end range for the backend based on the config parameter
282// query_backend_after. If the returned start == the returned end then backend querying is not necessary.

Callers 2

TestMaxDurationFunction · 0.95
RoundTripMethod · 0.95

Calls 1

MaxSearchDurationMethod · 0.65

Tested by 1

TestMaxDurationFunction · 0.76