mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-06 19:06:42 +01:00
Add Prometheus initial setup
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/hermeznetwork/hermez-node/log"
|
||||
"github.com/hermeznetwork/hermez-node/synchronizer"
|
||||
"github.com/hermeznetwork/tracerr"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
)
|
||||
|
||||
func handleNoRoute(c *gin.Context) {
|
||||
@@ -107,6 +108,8 @@ func (a *DebugAPI) Run(ctx context.Context) error {
|
||||
api.Use(cors.Default())
|
||||
debugAPI := api.Group("/debug")
|
||||
|
||||
debugAPI.GET("/metrics", gin.WrapH(promhttp.Handler()))
|
||||
|
||||
debugAPI.GET("sdb/batchnum", a.handleCurrentBatch)
|
||||
debugAPI.GET("sdb/mtroot", a.handleMTRoot)
|
||||
// Accounts returned by these endpoints will always have BatchNum = 0,
|
||||
|
||||
Reference in New Issue
Block a user