diff --git a/instana/django.py b/instana/django.py index fdc16156..b83ee0db 100644 --- a/instana/django.py +++ b/instana/django.py @@ -35,7 +35,7 @@ def process_request(self, request): span.set_tag(ext.HTTP_METHOD, request.method) span.set_tag("http.host", env['HTTP_HOST']) self.span = span - except as e: + except Exception as e: logger.debug("Instana middleware @ process_response: ", e) def process_response(self, request, response): @@ -51,7 +51,7 @@ def process_response(self, request, response): internal_tracer.inject(self.span.context, ot.Format.HTTP_HEADERS, response) self.span.finish() self.span = None - except as e: + except Exception as e: logger.debug("Instana middleware @ process_response: ", e) finally: return response