You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// DialMetrics instruments dials to proxy server with prometheus metrics.
54
+
typeDialMetricsstruct {
55
+
latencies*metrics.HistogramVec
56
+
failures*metrics.CounterVec
57
+
}
58
+
59
+
// newDialMetrics create a new DialMetrics, configured with default metric names.
60
+
funcnewDialMetrics() *DialMetrics {
61
+
latencies:=metrics.NewHistogramVec(
62
+
&metrics.HistogramOpts{
63
+
Namespace: namespace,
64
+
Subsystem: subsystem,
65
+
Name: "dial_duration_seconds",
66
+
Help: "Dial latency histogram in seconds, labeled by the protocol (http-connect or grpc), transport (tcp or uds)",
67
+
Buckets: latencyBuckets,
68
+
StabilityLevel: metrics.ALPHA,
69
+
},
70
+
[]string{"protocol", "transport"},
71
+
)
72
+
73
+
failures:=metrics.NewCounterVec(
74
+
&metrics.CounterOpts{
75
+
Namespace: namespace,
76
+
Subsystem: subsystem,
77
+
Name: "dial_failure_count",
78
+
Help: "Dial failure count, labeled by the protocol (http-connect or grpc), transport (tcp or uds), and stage (dial or proxy). The stage indicates at which stage the dial failed",
0 commit comments