Log requests to GCE

pull/6/head
Wojciech Tyczynski 2016-05-24 16:54:07 +02:00
parent 01e79b88e1
commit 55fdc1c036
1 changed files with 3 additions and 0 deletions

View File

@ -118,7 +118,10 @@ type rateLimitedRoundTripper struct {
}
func (rl *rateLimitedRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
startTime := time.Now()
rl.limiter.Accept()
// TODO: Reduce verbosity once #26119 is fixed.
glog.V(0).Infof("GCE api call: %s %s (throttled for %v)", req.Method, req.URL.String(), time.Now().Sub(startTime))
return rl.rt.RoundTrip(req)
}