-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmetrics.yaml
More file actions
116 lines (104 loc) · 3.28 KB
/
Copy pathmetrics.yaml
File metadata and controls
116 lines (104 loc) · 3.28 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
default:
step: 5s
timeout: 30s
metrics:
- name: read_latency_p50_ms
unit: ms
query: |
1000 * max by(ref) (
sdk_operation_latency_p50_seconds{operation_type="read",operation_status="success"}
)
- name: read_latency_p95_ms
unit: ms
query: |
1000 * max by(ref) (
sdk_operation_latency_p95_seconds{operation_type="read",operation_status="success"}
)
- name: read_latency_p99_ms
unit: ms
query: |
1000 * max by(ref) (
sdk_operation_latency_p99_seconds{operation_type="read",operation_status="success"}
)
- name: write_latency_p50_ms
unit: ms
query: |
1000 * max by(ref) (
sdk_operation_latency_p50_seconds{operation_type="write",operation_status="success"}
)
- name: write_latency_p95_ms
unit: ms
query: |
1000 * max by(ref) (
sdk_operation_latency_p95_seconds{operation_type="write",operation_status="success"}
)
- name: write_latency_p99_ms
unit: ms
query: |
1000 * max by(ref) (
sdk_operation_latency_p99_seconds{operation_type="write",operation_status="success"}
)
- name: read_throughput
unit: ops/s
query: |
sum by(ref) (
rate(sdk_operations_total{operation_type="read", operation_status="success"}[5s])
)
- name: write_throughput
unit: ops/s
query: |
sum by(ref) (
rate(sdk_operations_total{operation_type="write", operation_status="success"}[5s])
)
# sdk_operations_total = количество логических бизнес-запросов (всегда 1 на операцию).
# sdk_retry_attempts_total = общее количество технических попыток (включая первую).
- name: read_retry_attempts
unit: attempts
query: |
clamp_min(
round(
sum by(ref) (increase(sdk_retry_attempts_total{operation_type="read"}[5s]))
-
sum by(ref) (increase(sdk_operations_total{operation_type="read"}[5s]))
),
0
)
round: 1
# sdk_operations_total = количество логических бизнес-запросов (всегда 1 на операцию).
# sdk_retry_attempts_total = общее количество технических попыток (включая первую).
- name: write_retry_attempts
unit: attempts
query: |
clamp_min(
round(
sum by(ref) (increase(sdk_retry_attempts_total{operation_type="write"}[5s]))
-
sum by(ref) (increase(sdk_operations_total{operation_type="write"}[5s]))
),
0
)
round: 1
- name: read_availability
unit: "%"
query: |
clamp_max(
100 * (
sum by (ref) (rate(sdk_operations_total{operation_type="read", operation_status="success"}[5s]))
/
sum by (ref) (rate(sdk_operations_total{operation_type="read"}[5s]))
),
100
)
round: 0.01
- name: write_availability
unit: "%"
query: |
clamp_max(
100 * (
sum by (ref) (rate(sdk_operations_total{operation_type="write", operation_status="success"}[5s]))
/
sum by (ref) (rate(sdk_operations_total{operation_type="write"}[5s]))
),
100
)
round: 0.01