-
Notifications
You must be signed in to change notification settings - Fork 556
Closed
Description
If I call:
sentry_sdk.integrations.setup_integrations(
[sentry_sdk.integrations.aiohttp.AioHttpIntegration()])
after sentry_sdk.init()
the _handle
method of aiohttp.web.Application
gets replaced but the integration does not get registered in the client. This causes the replaced _handle
ro run into a codepath where there as a await
missing. This gives an exception in every request:
ERROR:aiohttp.server:Unhandled exception
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 447, in start
await resp.prepare(request)
AttributeError: 'coroutine' object has no attribute 'prepare'
/usr/local/lib/python3.7/site-packages/xxx/base.py:151: RuntimeWarning: coroutine 'Application._handle' was never awaited
self._loop.run_forever()
This will not get logged to sentry at all, because the aiohttp.server
logger gets ignored by (half-)installing the integration (see #259).
Metadata
Metadata
Assignees
Labels
No labels