MCPcopy Create free account
hub / github.com/cortexproject/cortex / getMaxExemplars

Method getMaxExemplars

pkg/ingester/ingester.go:1130–1138  ·  view source on GitHub ↗

getMaxExemplars returns the maxExemplars value set in limits config. If limits value is set to zero, it falls back to old configuration in block storage config.

(userID string)

Source from the content-addressed store, hash-verified

1128// If limits value is set to zero, it falls back to old configuration
1129// in block storage config.
1130func (i *Ingester) getMaxExemplars(userID string) int64 {
1131 maxExemplarsFromLimits := i.limits.MaxExemplars(userID)
1132
1133 if maxExemplarsFromLimits == 0 {
1134 return int64(i.cfg.BlocksStorageConfig.TSDB.MaxExemplars)
1135 }
1136
1137 return int64(maxExemplarsFromLimits)
1138}
1139
1140func (i *Ingester) updateActiveSeries(ctx context.Context) {
1141 purgeTime := time.Now().Add(-i.cfg.ActiveSeriesMetricsIdleTimeout)

Callers 4

updateUserTSDBConfigsMethod · 0.95
PushMethod · 0.95
createTSDBMethod · 0.95

Implementers 1

Ingesterpkg/ingester/ingester.go

Calls 1

MaxExemplarsMethod · 0.80

Tested by 1