Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8d5a391

Browse files
committedApr 7, 2023
fix comment
1 parent 8e6905a commit 8d5a391

File tree

1 file changed

+6
-9
lines changed
  • instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask

1 file changed

+6
-9
lines changed
 

‎instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -454,15 +454,12 @@ def _teardown_request(exc):
454454
# a way that doesn't run `before_request`, like when it is created
455455
# with `app.test_request_context`.
456456
#
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+
466463
return
467464
if exc is None:
468465
activation.__exit__(None, None, None)

0 commit comments

Comments
 (0)
Please sign in to comment.