Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Created in different context error for ContextVarsScopeManager #153

Open
gokhan721 opened this issue Nov 22, 2021 · 0 comments
Open

Created in different context error for ContextVarsScopeManager #153

gokhan721 opened this issue Nov 22, 2021 · 0 comments

Comments

@gokhan721
Copy link

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. 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant