disabling internal metrics disables /metric endpoint

but we will still keep sending metrics to graphite

closes #10638
This commit is contained in:
bergquist
2018-09-13 16:09:52 +02:00
parent bae560717d
commit bff350166e
4 changed files with 7 additions and 6 deletions
+4
View File
@@ -233,6 +233,10 @@ func (hs *HTTPServer) addMiddlewaresAndStaticRoutes() {
}
func (hs *HTTPServer) metricsEndpoint(ctx *macaron.Context) {
if !hs.Cfg.MetricsEndpointEnabled {
return
}
if ctx.Req.Method != "GET" || ctx.Req.URL.Path != "/metrics" {
return
}