prysm-pulse/beacon-chain/sync/initial-sync/metrics.go
Nishant Das 07a25ca710 Adding Prometheus Metrics and Tracing to Sync (#1858)
* adding tracing and metrics

* clean up main routine

* added tracing to initial sync

* gazelle

* fix tests

* fix naming

* comments

* consistent style in promauto counters

* rename spans

* final comment
2019-03-05 11:31:19 -06:00

39 lines
1.2 KiB
Go

package initialsync
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
// Metrics
sentBatchedBlockReq = promauto.NewCounter(prometheus.CounterOpts{
Name: "initsync_sent_batched_block_req",
Help: "The number of sent batched block req",
})
batchedBlockReq = promauto.NewCounter(prometheus.CounterOpts{
Name: "initsync_batched_block_req",
Help: "The number of received batch blocks responses",
})
blockReqSlot = promauto.NewCounter(prometheus.CounterOpts{
Name: "initsync_block_req_by_slot",
Help: "The number of sent block requests by slot",
})
recBlock = promauto.NewCounter(prometheus.CounterOpts{
Name: "initsync_received_blocks",
Help: "The number of received blocks",
})
recBlockAnnounce = promauto.NewCounter(prometheus.CounterOpts{
Name: "initsync_received_block_announce",
Help: "The number of received block announce",
})
stateReq = promauto.NewCounter(prometheus.CounterOpts{
Name: "initsync_state_req",
Help: "The number of sent state requests",
})
recState = promauto.NewCounter(prometheus.CounterOpts{
Name: "initsync_received_state",
Help: "The number of received state",
})
)