Merge pull request #4128 from cornershop/feature/service-collectLabel

feature(collectors): Added services to collectorLabels
This commit is contained in:
Kubernetes Prow Robot 2019-06-18 19:08:31 -07:00 committed by GitHub
commit cff97c210a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,7 +169,7 @@ func NewSocketCollector(pod, namespace, class string, metricsPerHost bool) (*Soc
Namespace: PrometheusNamespace,
ConstLabels: constLabels,
},
[]string{"ingress", "namespace", "status"},
[]string{"ingress", "namespace", "status", "service"},
),
bytesSent: prometheus.NewHistogramVec(
@ -243,6 +243,7 @@ func (sc *SocketCollector) handleMessage(msg []byte) {
"namespace": stats.Namespace,
"ingress": stats.Ingress,
"status": stats.Status,
"service": stats.Service,
}
latencyLabels := prometheus.Labels{