Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing supported version of tornado to 6.0 and above #909

Closed

Conversation

ashu658
Copy link
Member

@ashu658 ashu658 commented Feb 10, 2022

Description

Agent fails to detach context with tornado 5.1.1. The issue comes because contextvars does not work perfectly with tornado's gen.coroutine as mentioned in this issue. contextvars has problems with resetting the context with gen.coroutine. The fix for this is implemented in tornado 6.1

In tornado 5.1.1 _execute is implemented as gen.coroutine link whereas it is converted to a native coroutine in tornado 6 link. contextvars works corretcly with native coroutines. So, changing the supported version for the agent to tornado>=6 solves the issue.

Type of change

  • This change requires a documentation update

How Has This Been Tested?

Reproduce the issue: Running instrumented tornado 5.1.1 app with agent throws error. ERROR:opentelemetry.context:Failed to detach context
This error doesn’t come with tornado>=6. Tested by running manually.

Details on the setup to reproduce can be found in the comment thread of the issue #904

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Documentation has been updated

@ashu658 ashu658 requested a review from a team February 10, 2022 08:46
@ashu658 ashu658 changed the title Changing supported version of tornado to 6.0 Changing supported version of tornado to 6.0 and above Feb 10, 2022
@owais
Copy link
Contributor

owais commented Feb 10, 2022

While dropping support for 5.x makes sense if we don't support it, it is not really a fix for #904 :)

@ashu658
Copy link
Member Author

ashu658 commented Feb 10, 2022

Yes, sorry my bad. Removed the fixes statement.

@ocelotl
Copy link
Contributor

ocelotl commented Feb 28, 2022

This seems to be an issue with Tornado. Unless we can fix or bypass this issue with a commit to this repo that is not dropping support for 5.X.Y (I'd rather have an issue that can happen with a Tornado version rather than to drop support for that version completely), I say we close this issue.

@ashu658 ashu658 closed this Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants