Change proxy metrics to conform guideline

This commit is contained in:
danielqsj
2018-12-26 17:25:10 +08:00
parent 5252352ad8
commit 8975e62254
5 changed files with 39 additions and 5 deletions

View File

@@ -643,7 +643,8 @@ func (proxier *Proxier) syncProxyRules() {
start := time.Now()
defer func() {
metrics.SyncProxyRulesLatency.Observe(metrics.SinceInMicroseconds(start))
metrics.SyncProxyRulesLatency.Observe(metrics.SinceInSeconds(start))
metrics.DeprecatedSyncProxyRulesLatency.Observe(metrics.SinceInMicroseconds(start))
klog.V(4).Infof("syncProxyRules took %v", time.Since(start))
}()
// don't sync rules till we've received services and endpoints