diff --git a/apps/amo/middleware.py b/apps/amo/middleware.py index 5aa7dad65e..a0503c1542 100644 --- a/apps/amo/middleware.py +++ b/apps/amo/middleware.py @@ -18,7 +18,6 @@ import commonware.log import MySQLdb as mysql import tower import jingo -from statsd import statsd import amo from . import urlresolvers @@ -177,13 +176,3 @@ class TimingMiddleware(object): msg = '{method} "{url}" ({code}) {time:.2f} [{auth}]'.format(**d) timing_log.info(msg) return response - - -class GraphiteMiddleware(object): - - def process_response(self, request, response): - statsd.incr('response.%s' % response.status_code) - return response - - def process_exception(self, request, exception): - statsd.incr('response.500') diff --git a/settings.py b/settings.py index 2c6e1e5dd5..b0b07a3d67 100644 --- a/settings.py +++ b/settings.py @@ -247,7 +247,7 @@ MIDDLEWARE_CLASSES = ( # AMO URL middleware comes first so everyone else sees nice URLs. 'amo.middleware.TimingMiddleware', 'commonware.response.middleware.GraphiteRequestTimingMiddleware', - 'amo.middleware.GraphiteMiddleware', + 'commonware.response.middleware.GraphiteMiddleware', 'amo.middleware.LocaleAndAppURLMiddleware', # Mobile detection should happen in Zeus. 'mobility.middleware.DetectMobileMiddleware',