Remove Prometheus metrics prefix (#9543)

* Remove Prometheus metrics prefix

* Fix line widths

* Missed some metrics

* Fix CLI

* Run rustfmt on modified files

* Missing prefixes

* Hopefully fix compilation

* Rustfmt protocol.rs

* Should compile now I guess

* Rustfmt

Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
Pierre Krieger
2021-12-09 11:21:27 +01:00
committed by GitHub
parent 667dec91bf
commit 443bdc20d6
21 changed files with 125 additions and 102 deletions
+2 -2
View File
@@ -90,7 +90,7 @@ impl ServerMetrics {
Ok(Self {
session_opened: register(
Counter::new(
"rpc_sessions_opened",
"substrate_rpc_sessions_opened",
"Number of persistent RPC sessions opened",
)?,
r,
@@ -98,7 +98,7 @@ impl ServerMetrics {
.into(),
session_closed: register(
Counter::new(
"rpc_sessions_closed",
"substrate_rpc_sessions_closed",
"Number of persistent RPC sessions closed",
)?,
r,
@@ -48,7 +48,7 @@ impl RpcMetrics {
requests_started: register(
CounterVec::new(
Opts::new(
"rpc_requests_started",
"substrate_rpc_requests_started",
"Number of RPC requests (not calls) received by the server.",
),
&["protocol"],
@@ -58,7 +58,7 @@ impl RpcMetrics {
requests_finished: register(
CounterVec::new(
Opts::new(
"rpc_requests_finished",
"substrate_rpc_requests_finished",
"Number of RPC requests (not calls) processed by the server.",
),
&["protocol"],
@@ -68,7 +68,7 @@ impl RpcMetrics {
calls_time: register(
HistogramVec::new(
HistogramOpts::new(
"rpc_calls_time",
"substrate_rpc_calls_time",
"Total time [μs] of processed RPC calls",
),
&["protocol", "method"],
@@ -78,7 +78,7 @@ impl RpcMetrics {
calls_started: register(
CounterVec::new(
Opts::new(
"rpc_calls_started",
"substrate_rpc_calls_started",
"Number of received RPC calls (unique un-batched requests)",
),
&["protocol", "method"],
@@ -88,7 +88,7 @@ impl RpcMetrics {
calls_finished: register(
CounterVec::new(
Opts::new(
"rpc_calls_finished",
"substrate_rpc_calls_finished",
"Number of processed RPC calls (unique un-batched requests)",
),
&["protocol", "method", "is_error"],