Skip to content

Commit 8acfdce

Browse files
committed
update comment
1 parent 41e5fff commit 8acfdce

File tree

1 file changed

+2
-1
lines changed
  • instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware

1 file changed

+2
-1
lines changed

instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware/otel_middleware.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ def process_request(self, request):
292292
span, request
293293
)
294294
except Exception: # pylint: disable=broad-exception-caught
295-
# process_response() will not be called, so we need to clean up
295+
# Raising an exception here would leak the request span since process_response
296+
# would not be called. Log the exception instead.
296297
_logger.exception("Exception raised by request_hook")
297298

298299
# pylint: disable=unused-argument

0 commit comments

Comments
 (0)