Fix metrics for multiple entry points (#1071)

This commit is contained in:
Matevz Mihalic 2017-02-02 12:34:00 +01:00 committed by Vincent Demeester
parent c1182377db
commit c095fc1eab

View file

@ -172,7 +172,7 @@ func (server *Server) startHTTPServers() {
serverMiddlewares := []negroni.Handler{server.loggerMiddleware, metrics}
if server.globalConfiguration.Web != nil && server.globalConfiguration.Web.Metrics != nil {
if server.globalConfiguration.Web.Metrics.Prometheus != nil {
metricsMiddleware := middlewares.NewMetricsWrapper(middlewares.NewPrometheus("Global", server.globalConfiguration.Web.Metrics.Prometheus))
metricsMiddleware := middlewares.NewMetricsWrapper(middlewares.NewPrometheus(newServerEntryPointName, server.globalConfiguration.Web.Metrics.Prometheus))
serverMiddlewares = append(serverMiddlewares, metricsMiddleware)
}
}