diff options
Diffstat (limited to 'src/chttpd.erl')
-rw-r--r-- | src/chttpd.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/chttpd.erl b/src/chttpd.erl index 1cc15d7e..649b23bc 100644 --- a/src/chttpd.erl +++ b/src/chttpd.erl @@ -137,14 +137,17 @@ handle_request(MochiReq) -> end, RequestTime = round(timer:now_diff(now(), Begin)/1000), - showroom_log:message(notice, "~s ~s ~s ~s ~B ~B", [ + RequestInfo = [ MochiReq:get(peer), MochiReq:get_header_value("Host"), atom_to_list(Method1), RawUri, Resp:get(code), RequestTime - ]), + ], + Customer = cloudant_util:customer_name(HttpReq), + couch_metrics_req:notify({request, [Customer|RequestInfo]}), + showroom_log:message(notice, "~s ~s ~s ~s ~B ~B", RequestInfo), couch_stats_collector:record({couchdb, request_time}, RequestTime), couch_stats_collector:increment({httpd, requests}), {ok, Resp}. |