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

Method registerMetrics

pkg/ring/kv/multi.go:185–205  ·  view source on GitHub ↗
(registerer prometheus.Registerer)

Source from the content-addressed store, hash-verified

183}
184
185func (m *MultiClient) registerMetrics(registerer prometheus.Registerer) {
186 m.primaryStoreGauge = promauto.With(registerer).NewGaugeVec(prometheus.GaugeOpts{
187 Name: "multikv_primary_store",
188 Help: "Selected primary KV store",
189 }, []string{"store"})
190
191 m.mirrorEnabledGauge = promauto.With(registerer).NewGauge(prometheus.GaugeOpts{
192 Name: "multikv_mirror_enabled",
193 Help: "Is mirroring to secondary store enabled",
194 })
195
196 m.mirrorWritesCounter = promauto.With(registerer).NewCounter(prometheus.CounterOpts{
197 Name: "multikv_mirror_writes_total",
198 Help: "Number of mirror-writes to secondary store",
199 })
200
201 m.mirrorFailuresCounter = promauto.With(registerer).NewCounter(prometheus.CounterOpts{
202 Name: "multikv_mirror_write_errors_total",
203 Help: "Number of failures to mirror-write to secondary store",
204 })
205}
206
207func (m *MultiClient) updatePrimaryStoreGauge() {
208 _, pkv := m.getPrimaryClient()

Callers 1

NewMultiClientFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected