U \ @s~dZddlmZddlmZddlmZddlmZeZeZddZedd d d d d ddZ[dddZGdddeZdS)z This package)absolute_import)Lock) iteritems)loggercs.fdd}D]}|jd|7_q|S)Nc3s:ddlm}D]$}|dd\}}t|||VqdS)z@Returns an iterator of the default integration classes: r) import_module.N) importlibrrsplitgetattr)r import_stringmoduleclsimport_strings /__init__.pyiter_default_integrationss zJ_generate_default_integrations_iterator..iter_default_integrationsz - `{}`)__doc__format)rrr rrr'_generate_default_integrations_iterators    rz2sentry_sdk.integrations.logging.LoggingIntegrationz0sentry_sdk.integrations.stdlib.StdlibIntegrationz8sentry_sdk.integrations.excepthook.ExcepthookIntegrationz0sentry_sdk.integrations.dedupe.DedupeIntegrationz0sentry_sdk.integrations.atexit.AtexitIntegrationz2sentry_sdk.integrations.modules.ModulesIntegrationz,sentry_sdk.integrations.argv.ArgvIntegrationz6sentry_sdk.integrations.threading.ThreadingIntegrationTc Cstdd|pdD}td||rLtD]}|j|kr,|}|||j<q,t|D]\}}tr|tkrtd|zt| Wn<t k rt |dddk rt d|| nYnXt|W5QRXqT|D]}td |q|S) zGiven a list of integration instances this installs them all. When `with_defaults` is set to `True` then all default integrations are added unless they were already provided before. css|]}|j|fVqdS)N) identifier).0 integrationrrr >sz%setup_integrations..rz+Setting up integrations (with default = %s)z0Setting up previously not enabled integration %sinstallNzCIntegration %s: The install method is deprecated. Use `setup_once`.zEnabling integration %s)dictrdebugrrr_installer_lock_installed_integrationstype setup_onceNotImplementedErrorr warnradd)Z integrationsZ with_defaultsZintegration_clsinstancerrrrrsetup_integrations8s<     r&c@s$eZdZdZdZdZeddZdS) IntegrationzBaseclass for all integrations. To accept options for an integration, implement your own constructor that saves those options on `self`. NcCs tdS)a` Initialize the integration. This function is only called once, ever. Configuration is not available at this point, so the only thing to do here is to hook into exception handlers, and perhaps do monkeypatches. Inside those hooks `Integration.current` can be used to access the instance again. N)r"rrrrr!qs zIntegration.setup_once)__name__ __module__ __qualname__rrr staticmethodr!rrrrr'ds r'N)T)rZ __future__rZ threadingrZsentry_sdk._compatrZsentry_sdk.utilsrIteratorZDictZListSetZTypeCallablersetrrrr&objectr'rrrrs(      ,