summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2010-06-16 09:32:08 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-08-12 11:18:46 -0400
commitb229c6c4ec1e72a1ec7593d5626983e1d2065f67 (patch)
tree7bfb0c7701d2cc341c25e89e4819732e3052842e
parent50d87f96770fb54f2b2ea1728742b443c66134a3 (diff)
re-add GET /_metrics to see list of installed handlers
-rw-r--r--src/chttpd_misc.erl3
1 files changed, 3 insertions, 0 deletions
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 ->