Skip to content

Commit 6f06257

Browse files
authored
metrics: use Prometheus-standard le (less than or equal) labels (#876)
1 parent 8c5c38a commit 6f06257

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/metrics.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/VictoriaMetrics/metrics"
77
)
88

9-
var winningBidValue = metrics.NewHistogram("mev_boost_winning_bid_value")
9+
var winningBidValue = metrics.NewPrometheusHistogram("mev_boost_winning_bid_value")
1010

1111
const (
1212
beaconNodeStatusLabel = `mev_boost_beacon_node_status_code_total{http_status_code="%s",endpoint="%s"}`
@@ -25,7 +25,7 @@ func IncrementBeaconNodeStatus(status, endpoint string) {
2525

2626
func RecordBidValue(relay string, value float64) {
2727
l := fmt.Sprintf(bidValuesLabel, relay)
28-
metrics.GetOrCreateHistogram(l).Update(value)
28+
metrics.GetOrCreatePrometheusHistogram(l).Update(value)
2929
}
3030

3131
func IncrementBidBelowMinBid(relay string) {
@@ -39,7 +39,7 @@ func RecordWinningBidValue(value float64) {
3939

4040
func RecordRelayLatency(endpoint, relay string, latency float64) {
4141
l := fmt.Sprintf(relayLatencyLabel, endpoint, relay)
42-
metrics.GetOrCreateHistogram(l).Update(latency)
42+
metrics.GetOrCreatePrometheusHistogram(l).Update(latency)
4343
}
4444

4545
func RecordRelayStatusCode(httpStatus, endpoint, relay string) {
@@ -54,5 +54,5 @@ func RecordRelayLastSlot(relay string, slot uint64) {
5454

5555
func RecordMsIntoSlot(endpoint string, ms float64) {
5656
l := fmt.Sprintf(msIntoSlotLabel, endpoint)
57-
metrics.GetOrCreateHistogram(l).Update(ms)
57+
metrics.GetOrCreatePrometheusHistogram(l).Update(ms)
5858
}

0 commit comments

Comments
 (0)