Use path instead of full path for statsd logging

(imported from commit 48ddab1ed5b9fd6c6b87a2eb8c5119eb686f23ee)
This commit is contained in:
Leo Franchi 2013-05-13 10:36:21 -04:00
parent f7850d741a
commit 32dcc75b08

View File

@ -38,10 +38,10 @@ class LogRequests(object):
return "%.0fms" % (timedelta_ms(timedelta),)
# For statsd timer name
if request.get_full_path() == '/':
if request.path == '/':
statsd_path = 'webreq'
else:
statsd_path = "webreq.%s" % (request.get_full_path()[1:].replace('/', '.'),)
statsd_path = "webreq.%s" % (request.path[1:].replace('/', '.'),)
# The reverse proxy might have sent us the real external IP