@@ -52,11 +52,63 @@ var (
5252 },
5353 []string {"type" , "client_api_version" },
5454 )
55+
56+ watchSendLoopWatchStreamDuration = prometheus .NewHistogram (
57+ prometheus.HistogramOpts {
58+ Namespace : "etcd_debugging" ,
59+ Subsystem : "server" ,
60+ Name : "watch_send_loop_watch_stream_duration_seconds" ,
61+ Help : "The total duration in seconds of running through the send loop watch stream response all events." ,
62+ // lowest bucket start of upper bound 0.001 sec (1 ms) with factor 2
63+ // highest bucket start of 0.001 sec * 2^13 == 8.192 sec
64+ Buckets : prometheus .ExponentialBuckets (0.001 , 2 , 14 ),
65+ },
66+ )
67+
68+ watchSendLoopWatchStreamDurationPerEvent = prometheus .NewHistogram (
69+ prometheus.HistogramOpts {
70+ Namespace : "etcd_debugging" ,
71+ Subsystem : "server" ,
72+ Name : "watch_send_loop_watch_stream_duration_per_event_seconds" ,
73+ Help : "The average duration in seconds of running through the send loop watch stream response, per event." ,
74+ // lowest bucket start of upper bound 0.001 sec (1 ms) with factor 2
75+ // highest bucket start of 0.001 sec * 2^13 == 8.192 sec
76+ Buckets : prometheus .ExponentialBuckets (0.001 , 2 , 14 ),
77+ },
78+ )
79+
80+ watchSendLoopControlStreamDuration = prometheus .NewHistogram (
81+ prometheus.HistogramOpts {
82+ Namespace : "etcd_debugging" ,
83+ Subsystem : "server" ,
84+ Name : "watch_send_loop_control_stream_duration_seconds" ,
85+ Help : "The total duration in seconds of running through the send loop control stream response." ,
86+ // lowest bucket start of upper bound 0.001 sec (1 ms) with factor 2
87+ // highest bucket start of 0.001 sec * 2^13 == 8.192 sec
88+ Buckets : prometheus .ExponentialBuckets (0.001 , 2 , 14 ),
89+ },
90+ )
91+
92+ watchSendLoopProgressDuration = prometheus .NewHistogram (
93+ prometheus.HistogramOpts {
94+ Namespace : "etcd_debugging" ,
95+ Subsystem : "server" ,
96+ Name : "watch_send_loop_progress_duration_seconds" ,
97+ Help : "The total duration in seconds of running through the progress loop control stream response." ,
98+ // lowest bucket start of upper bound 0.001 sec (1 ms) with factor 2
99+ // highest bucket start of 0.001 sec * 2^13 == 8.192 sec
100+ Buckets : prometheus .ExponentialBuckets (0.001 , 2 , 14 ),
101+ },
102+ )
55103)
56104
57105func init () {
58106 prometheus .MustRegister (sentBytes )
59107 prometheus .MustRegister (receivedBytes )
60108 prometheus .MustRegister (streamFailures )
61109 prometheus .MustRegister (clientRequests )
110+ prometheus .MustRegister (watchSendLoopWatchStreamDuration )
111+ prometheus .MustRegister (watchSendLoopWatchStreamDurationPerEvent )
112+ prometheus .MustRegister (watchSendLoopControlStreamDuration )
113+ prometheus .MustRegister (watchSendLoopProgressDuration )
62114}
0 commit comments