update metrics endpoint

Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
David Lawrence 2016-02-01 17:26:20 -08:00
parent 3fcfa2043c
commit f26a5c3c57
3 changed files with 3 additions and 3 deletions

View File

@ -188,5 +188,5 @@ Notary Server provides the following features for operational friendliness:
1. A [Bugsnag](https://bugsnag.com) hook for error logs, if a Bugsnag
configuration is provided.
1. A [prometheus](http://prometheus.io/) endpoint at `/_notary_server/metrics`
1. A [prometheus](http://prometheus.io/) endpoint at `/metrics`
which provides HTTP stats.

View File

@ -108,7 +108,7 @@ func RootHandler(ac auth.AccessController, ctx context.Context, trust signed.Cry
hand(handlers.DeleteHandler, "push", "pull")))
r.Methods("GET").Path("/_notary_server/health").HandlerFunc(health.StatusHandler)
r.Methods("GET").Path("/_notary_server/metrics").Handler(prometheus.Handler())
r.Methods("GET").Path("/metrics").Handler(prometheus.Handler())
r.Methods("GET", "POST", "PUT", "HEAD", "DELETE").Path("/{other:.*}").Handler(
hand(handlers.NotFoundHandler))

View File

@ -59,7 +59,7 @@ func TestMetricsEndpoint(t *testing.T) {
ts := httptest.NewServer(handler)
defer ts.Close()
res, err := http.Get(ts.URL + "/_notary_server/metrics")
res, err := http.Get(ts.URL + "/metrics")
assert.NoError(t, err)
assert.Equal(t, http.StatusOK, res.StatusCode)
}