You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything has worked fine for ContextVarsScopeManager if I have only Fastapi application. But, When I tried to mount a Flask WSGIApplication to the Fastapi application, I've got an error from ContextVarsScopeManager as "<Token var=<ContextVar name='scope' at 0x7ff47d568a90> at 0x7ff47d61fe00> was created in a different Context". This error has been raised from after_request function of tracer.wrappers.fastapi.fastapi_wrapper module while trying to close scope. When I debugged the code, I have found out that "if token._var is not self" check into reset function of ContextVar class has caused this exception. I've created a sample project to reproduce the issue and shared it's Github url below.
Hi all,
Everything has worked fine for ContextVarsScopeManager if I have only Fastapi application. But, When I tried to mount a Flask WSGIApplication to the Fastapi application, I've got an error from ContextVarsScopeManager as "<Token var=<ContextVar name='scope' at 0x7ff47d568a90> at 0x7ff47d61fe00> was created in a different Context". This error has been raised from after_request function of tracer.wrappers.fastapi.fastapi_wrapper module while trying to close scope. When I debugged the code, I have found out that "if token._var is not self" check into reset function of ContextVar class has caused this exception. I've created a sample project to reproduce the issue and shared it's Github url below.
Github url: https://github.com/gokhan721/opentracing_contextvar_work
Thanks.
The text was updated successfully, but these errors were encountered: