@@ -44,7 +44,7 @@ func New() *Metrics {
4444 prometheus.CounterOpts {
4545 Namespace : promNamespace ,
4646 Name : "http_client_requests" ,
47- Help : "The number of requests for incoming requests." ,
47+ Help : "The number of incoming requests." ,
4848 },
4949 []string {"code" , "path" , "remote_address" },
5050 )
@@ -53,7 +53,7 @@ func New() *Metrics {
5353 Namespace : promNamespace ,
5454 Name : "http_client_duration_seconds" ,
5555 Help : "The duration in seconds for incoming client requests to be responded to." ,
56- Buckets : prometheus .LinearBuckets ( .000 , .05 , 30 ),
56+ Buckets : prometheus .ExponentialBuckets ( 0.005 , 0.005 , 10 ),
5757 },
5858 []string {"remote_address" },
5959 )
@@ -62,7 +62,7 @@ func New() *Metrics {
6262 prometheus.CounterOpts {
6363 Namespace : promNamespace ,
6464 Name : "http_server_requests" ,
65- Help : "The requests for outgoing server requests." ,
65+ Help : "The number of outgoing server requests." ,
6666 },
6767 []string {"code" , "path" , "remote_address" },
6868 )
@@ -71,7 +71,7 @@ func New() *Metrics {
7171 Namespace : promNamespace ,
7272 Name : "http_server_duration_seconds" ,
7373 Help : "The duration in seconds for outgoing server requests to be responded to." ,
74- Buckets : prometheus .LinearBuckets ( .000 , .05 , 30 ),
74+ Buckets : prometheus .ExponentialBuckets ( 0.005 , 0.005 , 10 ),
7575 },
7676 []string {"remote_address" },
7777 )
@@ -90,7 +90,7 @@ func New() *Metrics {
9090 Namespace : promNamespace ,
9191 Name : "token_review_duration_seconds" ,
9292 Help : "The duration in seconds for a token review lookup. Authenticated requests are 1, else 0." ,
93- Buckets : prometheus .LinearBuckets ( .000 , .05 , 30 ),
93+ Buckets : prometheus .ExponentialBuckets ( 0.005 , 0.005 , 10 ),
9494 },
9595 []string {"authenticated" , "code" , "remote_address" , "user" },
9696 )
@@ -170,9 +170,8 @@ func (m *Metrics) Shutdown() error {
170170
171171func (m * Metrics ) ObserveClient (code int , path , remoteAddress string , duration time.Duration ) {
172172 m .clientRequests .With (prometheus.Labels {
173- "code" : strconv .Itoa (code ),
174- "path" : path ,
175- "remote_address" : remoteAddress ,
173+ "code" : strconv .Itoa (code ),
174+ "path" : path ,
176175 }).Inc ()
177176
178177 m .clientDuration .With (prometheus.Labels {
@@ -182,9 +181,8 @@ func (m *Metrics) ObserveClient(code int, path, remoteAddress string, duration t
182181
183182func (m * Metrics ) ObserveServer (code int , path , remoteAddress string , duration time.Duration ) {
184183 m .serverRequests .With (prometheus.Labels {
185- "code" : strconv .Itoa (code ),
186- "path" : path ,
187- "remote_address" : remoteAddress ,
184+ "code" : strconv .Itoa (code ),
185+ "path" : path ,
188186 }).Inc ()
189187
190188 m .serverDuration .With (prometheus.Labels {
0 commit comments