@@ -32,7 +32,7 @@ import (
3232
3333// ClientTrace adds middleware providing a histogram of outgoing request
3434// latencies, partitioned by http client, request host and httptrace event.
35- func ClientTrace (obs prometheus.ObserverVec , c httpClient ) httpClient {
35+ func ClientTrace (obs prometheus.ObserverVec , next httpClient ) httpClient {
3636 // The supplied histogram NEEDS a label for the httptrace event.
3737 // TODO: Using `event` for now, but any other name is acceptable.
3838
@@ -79,16 +79,16 @@ func ClientTrace(obs prometheus.ObserverVec, c httpClient) httpClient {
7979 }
8080 r = r .WithContext (httptrace .WithClientTrace (context .Background (), trace ))
8181
82- return c .Do (r )
82+ return next .Do (r )
8383 })
8484}
8585
8686// InFlight is middleware that instruments number of open requests partitioned
8787// by http client and request host.
88- func InFlightC (gauge prometheus.Gauge , c httpClient ) httpClient {
88+ func InFlightC (gauge prometheus.Gauge , next httpClient ) httpClient {
8989 return ClientMiddleware (func (r * http.Request ) (* http.Response , error ) {
9090 gauge .Inc ()
91- resp , err := c .Do (r )
91+ resp , err := next .Do (r )
9292 if err != nil {
9393 return nil , err
9494 }
@@ -97,11 +97,11 @@ func InFlightC(gauge prometheus.Gauge, c httpClient) httpClient {
9797 })
9898}
9999
100- func CounterC (counter * prometheus.CounterVec , c httpClient ) httpClient {
100+ func CounterC (counter * prometheus.CounterVec , next httpClient ) httpClient {
101101 code , method := checkLabels (counter )
102102
103103 return ClientMiddleware (func (r * http.Request ) (* http.Response , error ) {
104- resp , err := c .Do (r )
104+ resp , err := next .Do (r )
105105 if err != nil {
106106 return nil , err
107107 }
0 commit comments