mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 20:16:37 +00:00
Bump Prometheus client version
- updates the Prometheus go client version and switches to the promhttp handler to avoid conflicts with the new system-level metrics. Tested with Docker Swarm locally - no conflicts and new metrics were gathered. Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
64a3f4e495
commit
e9cf708cb5
@ -7,6 +7,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
)
|
||||
|
||||
// MetricOptions to be used by web handlers
|
||||
@ -25,7 +26,7 @@ type ServiceMetricOptions struct {
|
||||
|
||||
// PrometheusHandler Bootstraps prometheus for metrics collection
|
||||
func PrometheusHandler() http.Handler {
|
||||
return prometheus.Handler()
|
||||
return promhttp.Handler()
|
||||
}
|
||||
|
||||
// BuildMetricsOptions builds metrics for tracking functions in the API gateway
|
||||
|
Reference in New Issue
Block a user