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)
| 1128 | // If limits value is set to zero, it falls back to old configuration |
| 1129 | // in block storage config. |
| 1130 | func (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 | |
| 1140 | func (i *Ingester) updateActiveSeries(ctx context.Context) { |
| 1141 | purgeTime := time.Now().Add(-i.cfg.ActiveSeriesMetricsIdleTimeout) |