Add Prometheus Metrics #49
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,5 +4,6 @@ ipld-ethcl-indexer.log
|
|||||||
report.json
|
report.json
|
||||||
cover.profile
|
cover.profile
|
||||||
temp/*
|
temp/*
|
||||||
|
.vscode/*
|
||||||
pkg/beaconclient/ssz-data/
|
pkg/beaconclient/ssz-data/
|
||||||
*.test
|
*.test
|
@ -8,7 +8,7 @@
|
|||||||
"driver": "PGX"
|
"driver": "PGX"
|
||||||
},
|
},
|
||||||
"bc": {
|
"bc": {
|
||||||
"address": "10.203.8.51",
|
"address": "localhost",
|
||||||
"port": 5052,
|
"port": 5052,
|
||||||
"type": "lighthouse",
|
"type": "lighthouse",
|
||||||
"bootRetryInterval": 30,
|
"bootRetryInterval": 30,
|
||||||
@ -17,7 +17,7 @@
|
|||||||
"connectionProtocol": "http"
|
"connectionProtocol": "http"
|
||||||
},
|
},
|
||||||
"t": {
|
"t": {
|
||||||
"skipSync": false
|
"skipSync": true
|
||||||
},
|
},
|
||||||
"log": {
|
"log": {
|
||||||
"level": "debug",
|
"level": "debug",
|
||||||
|
@ -46,8 +46,11 @@ func CreateBeaconClientMetrics() *BeaconClientMetrics {
|
|||||||
func prometheusRegisterHelper(name string, help string, varPointer *uint64) {
|
func prometheusRegisterHelper(name string, help string, varPointer *uint64) {
|
||||||
prometheus.MustRegister(prometheus.NewCounterFunc(
|
prometheus.MustRegister(prometheus.NewCounterFunc(
|
||||||
prometheus.CounterOpts{
|
prometheus.CounterOpts{
|
||||||
Name: name,
|
Namespace: "beacon_client",
|
||||||
Help: help,
|
Subsystem: "",
|
||||||
|
Name: name,
|
||||||
|
Help: help,
|
||||||
|
ConstLabels: map[string]string{},
|
||||||
},
|
},
|
||||||
func() float64 {
|
func() float64 {
|
||||||
return float64(atomic.LoadUint64(varPointer))
|
return float64(atomic.LoadUint64(varPointer))
|
||||||
|
Loading…
Reference in New Issue
Block a user