-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Labels
Description
The KVConfig
defined in kv/memberlist/memberlist_client.go
includes MetricsRegisterer prometheus.Registerer
:
dskit/kv/memberlist/memberlist_client.go
Lines 157 to 159 in a48e5b8
// Where to put custom metrics. Metrics are not registered, if this is nil. | |
MetricsRegisterer prometheus.Registerer `yaml:"-"` | |
MetricsNamespace string `yaml:"-"` |
This looks an anti-pattern to me. The registerer is typically specified in the NewXXX() function. In this case, I'm wondering if we could remove the registered from there and take it in input in the NewKV()
function.
Any reason why not doing it?