Replace YieldExporter() with Handler()
This commit is contained in:
parent
1cb4c819e1
commit
84d17b4d97
|
@ -34,14 +34,13 @@ var (
|
|||
|
||||
func StartServing(appState *appstate.ApplicationState) {
|
||||
gorest.RegisterService(api.NewMetricsService(appState))
|
||||
exporter := registry.DefaultRegistry.YieldExporter()
|
||||
|
||||
http.Handle("/", &StatusHandler{appState: appState})
|
||||
http.HandleFunc("/graph", graphHandler)
|
||||
http.HandleFunc("/console", consoleHandler)
|
||||
|
||||
http.Handle("/api/", gorest.Handle())
|
||||
http.Handle("/metrics.json", exporter)
|
||||
http.Handle("/metrics.json", registry.DefaultRegistry.Handler())
|
||||
if *useLocalAssets {
|
||||
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static"))))
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue