Browse Source

The Prometheus Go client has a new handler API.

pull/71/head
Matt T. Proud 12 years ago
parent
commit
d1e7f5bc4b
  1. 3
      web/web.go

3
web/web.go

@ -30,10 +30,9 @@ var (
func StartServing(persistence metric.MetricPersistence) {
gorest.RegisterService(api.NewMetricsService(persistence))
exporter := registry.DefaultRegistry.YieldExporter()
http.Handle("/", gorest.Handle())
http.Handle("/metrics.json", exporter)
http.Handle("/metrics.json", registry.DefaultHandler)
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static"))))
go http.ListenAndServe(*listenAddress, nil)

Loading…
Cancel
Save