Fix Prometheus duplicate error

This commit is contained in:
Abdul Rabbani 2022-05-25 09:16:39 -04:00
parent 327cb5819f
commit 217e6cb4d6
3 changed files with 8 additions and 4 deletions

1
.gitignore vendored
View File

@ -4,5 +4,6 @@ ipld-ethcl-indexer.log
report.json
cover.profile
temp/*
.vscode/*
pkg/beaconclient/ssz-data/
*.test

View File

@ -8,7 +8,7 @@
"driver": "PGX"
},
"bc": {
"address": "10.203.8.51",
"address": "localhost",
"port": 5052,
"type": "lighthouse",
"bootRetryInterval": 30,
@ -17,7 +17,7 @@
"connectionProtocol": "http"
},
"t": {
"skipSync": false
"skipSync": true
},
"log": {
"level": "debug",

View File

@ -46,8 +46,11 @@ func CreateBeaconClientMetrics() *BeaconClientMetrics {
func prometheusRegisterHelper(name string, help string, varPointer *uint64) {
prometheus.MustRegister(prometheus.NewCounterFunc(
prometheus.CounterOpts{
Namespace: "beacon_client",
Subsystem: "",
Name: name,
Help: help,
ConstLabels: map[string]string{},
},
func() float64 {
return float64(atomic.LoadUint64(varPointer))