rpc/metrics.rs: ValueRecorder -> Histogram.

This commit is contained in:
Jonathan Davies 2023-01-22 23:46:26 +00:00
parent 8d8023b39a
commit 045b93bd11

View file

@ -7,7 +7,7 @@ pub struct RpcMetrics {
pub(crate) rpc_netapp_error_counter: Counter<u64>,
pub(crate) rpc_garage_error_counter: Counter<u64>,
pub(crate) rpc_duration: ValueRecorder<f64>,
pub(crate) rpc_duration: Histogram<f64>,
}
impl RpcMetrics {
pub fn new() -> Self {
@ -30,7 +30,7 @@ impl RpcMetrics {
.with_description("Number of RPC errors (errors happening when handling the RPC)")
.init(),
rpc_duration: meter
.f64_value_recorder("rpc.duration")
.f64_histogram("rpc.duration")
.with_description("Duration of RPCs")
.init(),
}