File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -397,8 +397,9 @@ def _before_request():
397397
398398 activation = trace .use_span (span , end_on_exit = True )
399399 activation .__enter__ () # pylint: disable=E1101
400+ breakpoint ()
400401 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 )
402403 flask_request_environ [_ENVIRON_SPAN_KEY ] = span
403404 flask_request_environ [_ENVIRON_TOKEN ] = token
404405
@@ -440,7 +441,7 @@ def _teardown_request(exc):
440441 activation = flask .request .environ .get (_ENVIRON_ACTIVATION_KEY )
441442
442443 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 )
444445 if not activation or original_reqctx_id != current_reqctx_id :
445446 # This request didn't start a span, maybe because it was created in
446447 # 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