MCPcopy Index your code
hub / github.com/cortexproject/cortex / initOverridesExporter

Method initOverridesExporter

pkg/cortex/modules.go:228–242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

226}
227
228func (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
244func (t *Cortex) initDistributorService() (serv services.Service, err error) {
245 t.Cfg.Distributor.DistributorRing.ListenPort = t.Cfg.Server.GRPCListenPort

Callers

nothing calls this directly

Calls 2

NewOverridesExporterFunction · 0.92
isModuleEnabledMethod · 0.80

Tested by

no test coverage detected