From b229c6c4ec1e72a1ec7593d5626983e1d2065f67 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Wed, 16 Jun 2010 09:32:08 -0400 Subject: re-add GET /_metrics to see list of installed handlers --- src/chttpd_misc.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/chttpd_misc.erl b/src/chttpd_misc.erl index 3ed70bea..6a3261c6 100644 --- a/src/chttpd_misc.erl +++ b/src/chttpd_misc.erl @@ -214,6 +214,9 @@ handle_log_req(#httpd{method='GET'}=Req) -> handle_log_req(Req) -> send_method_not_allowed(Req, "GET"). +handle_metrics_req(#httpd{method='GET', path_parts=[_]}=Req) -> + {_, L} = lists:unzip(gen_event:which_handlers(couch_metrics_event_manager)), + send_json(Req, L); handle_metrics_req(#httpd{method='GET', path_parts=[_, Id]}=Req) -> case chttpd:qs_value(Req, "slice") of undefined -> -- cgit v1.2.3