1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
use diem_metrics::{register_histogram_vec, register_int_counter_vec, HistogramVec, IntCounterVec};
use once_cell::sync::Lazy;
pub static RPC_REQUESTS: Lazy<IntCounterVec> = Lazy::new(|| {
register_int_counter_vec!(
"diem_client_service_rpc_requests_count",
"Cumulative number of rpc requests that JSON RPC client service receives",
&["type"] )
.unwrap()
});
pub static RPC_REQUEST_LATENCY: Lazy<HistogramVec> = Lazy::new(|| {
register_histogram_vec!(
"diem_client_service_rpc_request_latency_seconds",
"Diem client service rpc request latency histogram",
&["type"] )
.unwrap()
});
pub static REQUESTS: Lazy<IntCounterVec> = Lazy::new(|| {
register_int_counter_vec!(
"diem_client_service_requests_count",
"Cumulative number of requests that JSON RPC client service receives",
&[
"type", "method", "result", "sdk_lang", "sdk_ver", ]
)
.unwrap()
});
pub static INVALID_REQUESTS: Lazy<IntCounterVec> = Lazy::new(|| {
register_int_counter_vec!(
"diem_client_service_invalid_requests_count",
"Cumulative number of invalid requests that JSON RPC client service receives",
&[
"type", "method", "errortype", "sdk_lang", "sdk_ver", ]
)
.unwrap()
});
pub static INTERNAL_ERRORS: Lazy<IntCounterVec> = Lazy::new(|| {
register_int_counter_vec!(
"diem_client_service_internal_error_count",
"Cumulative number of internal error",
&[
"type", "method", "errorcode", "sdk_lang", "sdk_ver", ]
)
.unwrap()
});
pub static METHOD_LATENCY: Lazy<HistogramVec> = Lazy::new(|| {
register_histogram_vec!(
"diem_client_service_method_latency_seconds",
"Diem client service method latency histogram",
&[
"type", "method" ]
)
.unwrap()
});