Skip to content

Commit 17dd4dd

Browse files
committed
go back to histogram
1 parent aadbc6e commit 17dd4dd

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

app/sse/listener.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ func (p *listener) recordBlockProcessingTime(slot uint64, addr string, headTimes
313313

314314
processingTime := headTimestamp.Sub(gossipTime)
315315
if processingTime > 0 {
316-
sseBlockProcessingTimeGauge.WithLabelValues(addr).Set(processingTime.Seconds())
316+
sseBlockProcessingTimeHistogram.WithLabelValues(addr).Observe(processingTime.Seconds())
317317
}
318318

319319
// Clean up this entry as it's no longer needed

app/sse/metrics.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ var (
4848
Buckets: []float64{0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 6, 8, 10, 12},
4949
}, []string{"addr"})
5050

51-
sseBlockProcessingTimeGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{
51+
sseBlockProcessingTimeHistogram = promauto.NewHistogramVec(prometheus.HistogramOpts{
5252
Namespace: "app",
5353
Subsystem: "beacon_node",
5454
Name: "sse_block_processing_time",
55-
Help: "Most recent block processing time in seconds (time between block gossip and head events). Lower values indicate better CPU/disk/RAM performance.",
55+
Help: "Time in seconds between block gossip and head events, indicating block processing time. Lower values indicate better CPU/disk/RAM performance.",
56+
Buckets: []float64{0.01, 0.05, 0.1, 0.2, 0.5, 1, 2, 4},
5657
}, []string{"addr"})
5758
)

docs/metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ when storing metrics from multiple nodes or clusters in one Prometheus instance.
1616
| `app_beacon_node_peers` | Gauge | Gauge set to the peer count of the upstream beacon node | |
1717
| `app_beacon_node_sse_block` | Histogram | Block imported into fork choice delay, supplied by beacon node`s SSE endpoint. Values between 0s and 4s for Ethereum mainnet are considered safe | `addr` |
1818
| `app_beacon_node_sse_block_gossip` | Histogram | Block reception via gossip delay, supplied by beacon node`s SSE endpoint. Values between 0s and 4s for Ethereum mainnet are considered safe | `addr` |
19-
| `app_beacon_node_sse_block_processing_time` | Gauge | Most recent block processing time in seconds (time between block gossip and head events). Lower values indicate better CPU/disk/RAM performance. | `addr` |
19+
| `app_beacon_node_sse_block_processing_time` | Histogram | Time in seconds between block gossip and head events, indicating block processing time. Lower values indicate better CPU/disk/RAM performance. | `addr` |
2020
| `app_beacon_node_sse_chain_reorg_depth` | Histogram | Chain reorg depth, supplied by beacon node`s SSE endpoint | `addr` |
2121
| `app_beacon_node_sse_head_delay` | Histogram | Delay in seconds between slot start and head update, supplied by beacon node`s SSE endpoint. Values between 8s and 12s for Ethereum mainnet are considered safe. | `addr` |
2222
| `app_beacon_node_sse_head_slot` | Gauge | Current beacon node head slot, supplied by beacon node`s SSE endpoint | `addr` |

0 commit comments

Comments
 (0)