Refs #50
File: crates/charon-metrics/src/lib.rs
Problem
charon_pipeline_block_duration_seconds histogram uses default Prometheus buckets (0.005s — 10s). BSC produces a block every ~3s. Pipeline duration of interest spans 50ms (idle) to 5s+ (overrun, per PR #42 #174). Default buckets give too much resolution at 5ms-100ms (irrelevant) and not enough at 1s-5s (the alert range).
Fix
Define buckets:
const BLOCK_DURATION_BUCKETS: &[f64] = &[
0.05, 0.1, 0.25, 0.5, // healthy
1.0, 2.0, // warning
3.0, // BSC block time — alert threshold
5.0, 10.0, // overrun
];
Grafana SLO panel can then render p50/p95/p99 against the 3s line.
Refs #50
File: crates/charon-metrics/src/lib.rs
Problem
charon_pipeline_block_duration_seconds histogram uses default Prometheus buckets (0.005s — 10s). BSC produces a block every ~3s. Pipeline duration of interest spans 50ms (idle) to 5s+ (overrun, per PR #42 #174). Default buckets give too much resolution at 5ms-100ms (irrelevant) and not enough at 1s-5s (the alert range).
Fix
Define buckets:
Grafana SLO panel can then render p50/p95/p99 against the 3s line.