Skip to content

Commit

Permalink
Fix/validator metrics name (#86)
Browse files Browse the repository at this point in the history
* fix metrics naming

* Remove unused duplicated metric
  • Loading branch information
lukanus authored Feb 6, 2023
1 parent c7a4022 commit ce0da00
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pkg/validators/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,20 @@ func (rm *StoreManager) AttachMetrics(m *metrics.Metrics) {
}

type RegisterMetrics struct {
Timing *prometheus.HistogramVec
RegistrationsCacheHits *prometheus.CounterVec
}

func (r *Register) initMetrics() {
r.m.Timing = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Namespace: "dreamboat",
Subsystem: "relay",
Name: "timing",
Help: "Duration of requests per function",
}, []string{"function", "type"})

r.m.RegistrationsCacheHits = prometheus.NewCounterVec(prometheus.CounterOpts{
Namespace: "dreamboat",
Subsystem: "relayprocess",
Subsystem: "validators",
Name: "registrationCache",
Help: "cache hit/miss",
}, []string{"result"})

}

func (r *Register) AttachMetrics(m *metrics.Metrics) {
m.Register(r.m.Timing)
m.Register(r.m.RegistrationsCacheHits)
}

0 comments on commit ce0da00

Please sign in to comment.