prysm-pulse/validator/client/beacon-api/metrics.go
Radosław Kapka ee9274a9bc
REST VC metrics (#13588)
* REST VC metrics

* validator status is not used

* refactor

* remove test

* server-side

* server-side per endpoint

* cleanup

* add config endpoints

* add proper HTTP methods to endpoints

* initialize missing fields
2024-03-05 18:15:46 +00:00

35 lines
1.0 KiB
Go

package beacon_api
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
httpActionLatency = promauto.NewHistogramVec(
prometheus.HistogramOpts{
Namespace: "validator",
Name: "http_action_latency_seconds",
Help: "Latency of HTTP actions performed against the beacon node in seconds. This metric captures only actions that didn't result in an error.",
Buckets: []float64{0.001, 0.01, 0.025, 0.1, 0.25, 1, 2.5, 10},
},
[]string{"action"},
)
httpActionCount = promauto.NewCounterVec(
prometheus.CounterOpts{
Namespace: "validator",
Name: "http_action_count",
Help: "Number of all HTTP actions performed against the beacon node",
},
[]string{"action"},
)
failedHTTPActionCount = promauto.NewCounterVec(
prometheus.CounterOpts{
Namespace: "validator",
Name: "failed_http_action_count",
Help: "Number of failed HTTP actions performed against the beacon node",
},
[]string{"action"},
)
)