Remove content-length metrics.
Gauge is not really the best type for it and we don't support histogram
metrics at this point.
@@ -43,10 +43,6 @@ class RequestInstrumentationMiddleware(object):
metrics_driver = get_driver()
- if request.content_length:
- key = '%s.request.size' % (self._service_name)
- metrics_driver.set_gauge(key, int(request.content_length))
-
key = '%s.request.total' % (self._service_name)
metrics_driver.inc_counter(key)
@@ -118,11 +114,6 @@ class ResponseInstrumentationMiddleware(object):
metrics_driver.inc_counter('%s.response.status.%s' % (self._service_name,
status_code))
- content_length = dict(headers).get('Content-Length', None)
- if content_length:
- key = '%s.response.size' % (self._service_name)
- metrics_driver.set_gauge(key, int(content_length))
-
return start_response(status, headers, exc_info)
return self.app(environ, custom_start_response)
