mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 02:31:19 +00:00
ee9274a9bc
* 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
35 lines
1.0 KiB
Go
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"},
|
|
)
|
|
)
|