Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/sse/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (p *listener) handleChainReorgEvent(ctx context.Context, event *event, addr
z.Str("old_head_block", chainReorg.OldHeadBlock),
z.Str("new_head_block", chainReorg.NewHeadBlock))

sseChainReorgDepthGauge.WithLabelValues(addr).Set(float64(depth))
sseChainReorgDepthHistogram.WithLabelValues(addr).Observe(float64(depth))

return nil
}
Expand Down
3 changes: 2 additions & 1 deletion app/sse/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ var (
Buckets: []float64{8, 9, 10, 11, 12, 14, 16, 20},
}, []string{"addr"})

sseChainReorgDepthGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{
sseChainReorgDepthHistogram = promauto.NewHistogramVec(prometheus.HistogramOpts{
Namespace: "app",
Subsystem: "beacon_node",
Name: "sse_chain_reorg_depth",
Help: "Chain reorg depth, supplied by beacon node's SSE endpoint",
Buckets: []float64{1, 2, 4, 6, 8, 16},
}, []string{"addr"})
)
2 changes: 1 addition & 1 deletion docs/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ when storing metrics from multiple nodes or clusters in one Prometheus instance.
| Name | Type | Help | Labels |
|---|---|---|---|
| `app_beacon_node_peers` | Gauge | Gauge set to the peer count of the upstream beacon node | |
| `app_beacon_node_sse_chain_reorg_depth` | Gauge | Chain reorg depth, supplied by beacon node`s SSE endpoint | `addr` |
| `app_beacon_node_sse_chain_reorg_depth` | Histogram | Chain reorg depth, supplied by beacon node`s SSE endpoint | `addr` |
| `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` |
| `app_beacon_node_sse_head_slot` | Gauge | Current beacon node head slot, supplied by beacon node`s SSE endpoint | `addr` |
| `app_beacon_node_version` | Gauge | Constant gauge with label set to the node version of the upstream beacon node | `version` |
Expand Down
Loading