File tree 1 file changed +3
-2
lines changed
instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -397,8 +397,9 @@ def _before_request():
397
397
398
398
activation = trace .use_span (span , end_on_exit = True )
399
399
activation .__enter__ () # pylint: disable=E1101
400
+ breakpoint ()
400
401
flask_request_environ [_ENVIRON_ACTIVATION_KEY ] = activation
401
- flask_request_environ [_ENVIRON_REQCTX_ID_KEY ] = id (flask .request_ctx )
402
+ flask_request_environ [_ENVIRON_REQCTX_ID_KEY ] = id (flask ._request_ctx_stack . top )
402
403
flask_request_environ [_ENVIRON_SPAN_KEY ] = span
403
404
flask_request_environ [_ENVIRON_TOKEN ] = token
404
405
@@ -440,7 +441,7 @@ def _teardown_request(exc):
440
441
activation = flask .request .environ .get (_ENVIRON_ACTIVATION_KEY )
441
442
442
443
original_reqctx_id = flask .request .environ .get (_ENVIRON_REQCTX_ID_KEY )
443
- current_reqctx_id = id (flask .request_ctx )
444
+ current_reqctx_id = id (flask ._request_ctx_stack . top )
444
445
if not activation or original_reqctx_id != current_reqctx_id :
445
446
# This request didn't start a span, maybe because it was created in
446
447
# a way that doesn't run `before_request`, like when it is created
You can’t perform that action at this time.
0 commit comments