Skip to content

Commit bb5a2a6

Browse files
authored
Merge pull request #1500 from lightninglabs/rpc-endpoint-latency-histogram
monitoring: expand Prometheus buckets for RPC endpoint latency
2 parents ef7f4ff + 0002719 commit bb5a2a6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

monitoring/monitoring_on.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ func GetPromInterceptors(cfg *PrometheusConfig) ([]grpc.UnaryServerInterceptor,
2929
}
3030

3131
if cfg.PerfHistograms {
32-
opt := grpc_prometheus.WithServerHandlingTimeHistogram()
32+
// Set the histogram buckets in seconds.
33+
histogramBuckets := []float64{
34+
0.01, 0.1, 0.5, 1, 5, 10, 60, 120, 240, 600, 1200,
35+
}
36+
opt := grpc_prometheus.WithServerHandlingTimeHistogram(
37+
grpc_prometheus.WithHistogramBuckets(histogramBuckets),
38+
)
39+
3340
opts = append(opts, opt)
3441
}
3542

0 commit comments

Comments
 (0)