Open UrekD opened 9 months ago
Is there a way to avoid this issue until it's queued for a fix please?
This seems to happen because due to how quart_flask_patch
patches things, the SDK thinks this is now a Flask app and tries to wrap the async Quart requests in a sync WSGI wrapper.
This might work:
sentry_sdk.init(
# your usual stuff
auto_enabling_integrations=False,
)
This will tell the SDK to only enable integrations that you explicitly provide in the init
. Without this option the default behavior is to auto-detect what is installed and enable the corresponding integrations if available (so in this case, it'd enable the incorrect Flask integration).
Caveat to this: You'll have to enable all library/framework integrations by hand after doing this. So e.g. if you're also using something like SQLAlchemy, you'll need to add the integration into the init
's integrations
list. You can find out which integrations might be enabled in the background by setting debug=True
in the init
; the SDK will then print out all enabled integrations at startup. This docs page also has a list of auto-enabled integrations.
We also have a new disabled_integrations
option, which allows you to provide a list of integrations you wish to disable, while keeping all other auto-enabling integrations enabled
How do you use Sentry?
Self-hosted/on-premise
Version
1.40.0
Steps to Reproduce
import quart_flask_patch
Expected Result
To not break.
Actual Result