()
| 226 | } |
| 227 | |
| 228 | func (t *Cortex) initOverridesExporter() (services.Service, error) { |
| 229 | if t.Cfg.isModuleEnabled(OverridesExporter) && t.TenantLimits == nil { |
| 230 | // This target isn't enabled by default ("all") and requires per-tenant limits to |
| 231 | // work. Fail if it can't be setup correctly since the user explicitly wanted this |
| 232 | // target to run. |
| 233 | return nil, errors.New("overrides-exporter has been enabled, but no runtime configuration file was configured") |
| 234 | } |
| 235 | |
| 236 | exporter := validation.NewOverridesExporter(t.TenantLimits) |
| 237 | prometheus.MustRegister(exporter) |
| 238 | |
| 239 | // the overrides exporter has no state and reads overrides for runtime configuration each time it |
| 240 | // is collected so there is no need to return any service |
| 241 | return nil, nil |
| 242 | } |
| 243 | |
| 244 | func (t *Cortex) initDistributorService() (serv services.Service, err error) { |
| 245 | t.Cfg.Distributor.DistributorRing.ListenPort = t.Cfg.Server.GRPCListenPort |
nothing calls this directly
no test coverage detected