Break request metrics in apiserver by client.

This commit is contained in:
Filip Grzadkowski
2015-04-22 16:51:08 +02:00
parent fc50201f89
commit 8b755c805b
5 changed files with 24 additions and 11 deletions

View File

@@ -33,6 +33,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest"
"github.com/GoogleCloudPlatform/kubernetes/pkg/httplog"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/httpstream"
proxyutil "github.com/GoogleCloudPlatform/kubernetes/pkg/util/proxy"
@@ -55,7 +56,7 @@ func (r *ProxyHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
var apiResource string
var httpCode int
reqStart := time.Now()
defer monitor("proxy", &verb, &apiResource, &httpCode, reqStart)
defer monitor(&verb, &apiResource, util.GetClient(req), &httpCode, reqStart)
requestInfo, err := r.apiRequestInfoResolver.GetAPIRequestInfo(req)
if err != nil {