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, Namespace: PrometheusNamespace,
ConstLabels: constLabels, ConstLabels: constLabels,
}, },
[]string{"ingress", "namespace", "status"}, []string{"ingress", "namespace", "status", "service"},
), ),
bytesSent: prometheus.NewHistogramVec( bytesSent: prometheus.NewHistogramVec(
@ -243,6 +243,7 @@ func (sc *SocketCollector) handleMessage(msg []byte) {
"namespace": stats.Namespace, "namespace": stats.Namespace,
"ingress": stats.Ingress, "ingress": stats.Ingress,
"status": stats.Status, "status": stats.Status,
"service": stats.Service,
} }
latencyLabels := prometheus.Labels{ latencyLabels := prometheus.Labels{