File tree 1 file changed +6
-9
lines changed
instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -454,15 +454,12 @@ def _teardown_request(exc):
454
454
# a way that doesn't run `before_request`, like when it is created
455
455
# with `app.test_request_context`.
456
456
#
457
- # Similarly, check that the id(request) matches the current id(request)
458
- # to ensure tear down only happens if they match. This situation can arise
459
- # TODO
460
- #
461
- # Similarly, check the id(request) against the current thread to ensure
462
- # tear down only happens on the original thread. This situation can
463
- # arise if the original thread handling the request spawn children
464
- # threads and then uses something like copy_current_request_context
465
- # to copy the request context.
457
+ # Similarly, check that the request_ctx that created the span
458
+ # matches the current request_ctx, and only tear down if they match.
459
+ # This situation can arise if the original request_ctx handling
460
+ # the request calls functions that push new request_ctx's,
461
+ # like any decorated with `flask.copy_current_request_context`.
462
+
466
463
return
467
464
if exc is None :
468
465
activation .__exit__ (None , None , None )
You can’t perform that action at this time.
0 commit comments