suffix _count

This commit is contained in:
Nate Franzen 2018-09-13 19:03:11 -07:00
parent 2a7b6c1d02
commit e4faa1ac22
2 changed files with 6 additions and 5 deletions

View File

@ -32,7 +32,8 @@ func ServeMetrics(l net.Listener, shutdownC <-chan struct{}, logger *logrus.Logg
WriteTimeout: 10 * time.Second,
}
http.Handle("/metrics", promhttp.Handler())
metricsPath := "/metrics"
http.Handle(metricsPath, promhttp.Handler())
wg.Add(1)
go func() {

View File

@ -94,7 +94,7 @@ func InitializeTunnelMetrics(commonLabelKeys []string) *TunnelMetrics {
// not a labelled vector
haConnections := prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "argo_ha_connections",
Name: "argo_ha_connection_count",
Help: "Number of active HA connections",
},
)
@ -103,14 +103,14 @@ func InitializeTunnelMetrics(commonLabelKeys []string) *TunnelMetrics {
// not a labelled vector
timerRetries := prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "argo_timer_retries",
Name: "argo_timer_retry_count",
Help: "Unacknowledged heart beats count",
})
prometheus.MustRegister(timerRetries)
requests := prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "argo_http_request",
Name: "argo_http_request_count",
Help: "Count of requests",
},
labelKeys,
@ -119,7 +119,7 @@ func InitializeTunnelMetrics(commonLabelKeys []string) *TunnelMetrics {
responses := prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "argo_http_response",
Name: "argo_http_response_count",
Help: "Count of responses",
},
append(labelKeys, statusKey),