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

Sentry integration and background tasks #2576

Closed
cnicodeme opened this issue Oct 18, 2022 · 5 comments
Closed

Sentry integration and background tasks #2576

cnicodeme opened this issue Oct 18, 2022 · 5 comments
Labels

Comments

@cnicodeme
Copy link
Contributor

Describe the bug
Looking at the Sentry integration, a hub is created on request ('http.lifecycle.request' => _hub_enter) and removed at exit ('http.lifecycle.response' => _hub_exit).

If I understand this correctly, it means that if an exception occurs outside of the request, no Hub will be define and the exception won't be caught by Sentry.

This can happen when running a long background_task from a request handler that has already returned a response.

Environment (please complete the following information):

  • Sanic Version: 22.9.0
  • Sentry SDK : 1.9.9
@cnicodeme cnicodeme added the bug label Oct 18, 2022
@cnicodeme
Copy link
Contributor Author

(Maybe I should open this ticket at Sentry instead of Sanic? Just let me know)

@sjsadowski
Copy link
Contributor

@cnicodeme please open the issue with Sentry, while we may contribute there this is not specifically a sanic issue. I also know they may defer to only supporting our LTS (.12) releases.

@cnicodeme
Copy link
Contributor Author

Ok, will do!

@ahopkins
Copy link
Member

ping me in that issue

@cnicodeme
Copy link
Contributor Author

Done :)

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

No branches or pull requests

3 participants