[#155] metrics: Use default registerer for app metrics

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
Denis Kirillov 2023-06-28 11:57:31 +03:00
parent 2cbe3b9a27
commit 499f4c6495

View file

@ -16,7 +16,7 @@ type StatisticScraper interface {
}
type GateMetrics struct {
registry *prometheus.Registry
registry prometheus.Registerer
State *StateMetrics
Pool *poolMetricsCollector
Billing *billingMetrics
@ -24,7 +24,7 @@ type GateMetrics struct {
}
func NewGateMetrics(scraper StatisticScraper) *GateMetrics {
registry := prometheus.NewRegistry()
registry := prometheus.DefaultRegisterer
stateMetric := newStateMetrics()
registry.MustRegister(stateMetric)