File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 22from threading import Lock
33from typing import TYPE_CHECKING
44
5- import sentry_sdk
65from sentry_sdk .utils import logger
76
87if TYPE_CHECKING :
Original file line number Diff line number Diff line change @@ -164,9 +164,8 @@ async def async_entrypoint():
164164
165165 Any arguments provided will be passed to AsyncioIntegration() as is.
166166
167- If AsyncioIntegration is already enabled on the current client (e.g. because
168- it was provided in sentry_sdk.init(integrations=[...])), this function won't
169- have any effect.
167+ If AsyncioIntegration has already patched the current event loop, this
168+ function won't have any effect.
170169
171170 If AsyncioIntegration was provided in
172171 sentry_sdk.init(disabled_integrations=[...]), this function will ignore that
@@ -176,6 +175,12 @@ async def async_entrypoint():
176175 if not client .is_active ():
177176 return
178177
178+ # This function purposefully bypasses the integration machinery in
179+ # integrations/__init__.py. _installed_integrations/_processed_integrations
180+ # is used to prevent double patching the same module, but in the case of
181+ # the AsyncioIntegration, we don't monkeypatch the standard library directly,
182+ # we patch the currently running event loop, and we keep the record of doing
183+ # that on the loop itself.
179184 logger .debug ("Setting up integration asyncio" )
180185 integration = AsyncioIntegration (* args , ** kwargs )
181186 integration .setup_once ()
You can’t perform that action at this time.
0 commit comments