-
Notifications
You must be signed in to change notification settings - Fork 474
/
metrics_definitions.go
84 lines (81 loc) · 1.79 KB
/
metrics_definitions.go
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
package business
type istioMetric struct {
kialiName string
istioName string
isHisto bool
useErrorLabels bool
}
var istioMetrics = []istioMetric{
{
kialiName: "grpc_received",
istioName: "istio_response_messages_total",
isHisto: false,
},
{
kialiName: "grpc_sent",
istioName: "istio_request_messages_total",
isHisto: false,
},
{
kialiName: "request_count",
istioName: "istio_requests_total",
isHisto: false,
},
{
kialiName: "request_error_count",
istioName: "istio_requests_total",
isHisto: false,
useErrorLabels: true,
},
{
kialiName: "request_duration_millis",
istioName: "istio_request_duration_milliseconds",
isHisto: true,
},
{
kialiName: "request_throughput",
istioName: "istio_request_bytes_sum",
isHisto: false,
},
{
kialiName: "response_throughput",
istioName: "istio_response_bytes_sum",
isHisto: false,
},
{
kialiName: "request_size",
istioName: "istio_request_bytes",
isHisto: true,
},
{
kialiName: "response_size",
istioName: "istio_response_bytes",
isHisto: true,
},
{
kialiName: "tcp_received",
istioName: "istio_tcp_sent_bytes_total", // L4 telemetry is backwards, see https://github.com/istio/istio/issues/32399
isHisto: false,
},
{
kialiName: "tcp_sent",
istioName: "istio_tcp_received_bytes_total", // L4 telemetry is backwards, see https://github.com/istio/istio/issues/32399
isHisto: false,
},
{
kialiName: "tcp_opened",
istioName: "istio_tcp_connections_opened_total",
isHisto: false,
},
{
kialiName: "tcp_closed",
istioName: "istio_tcp_connections_closed_total",
isHisto: false,
},
}
func (in *istioMetric) labelsToUse(labels string, labelsError []string) []string {
if in.useErrorLabels {
return labelsError
}
return []string{labels}
}