ddtrace/settings.py
def _add(self, integration, settings, merge=True):
        """Internal API that registers an integration with given default
        settings.

        :param str integration: The integration name (i.e. `requests`)
        :param dict settings: A dictionary that contains integration settings;
            to preserve immutability of these values, the dictionary is copied
            since it contains integration defaults.
        :param bool merge: Whether to merge any existing settings with those provided,
            or if we should overwrite the settings with those provided;
            Note: when merging existing settings take precedence.
        """
        # DEV: Use `getattr()` to call our `__getattr__` helper
        existing = getattr(self, integration)
        settings = deepcopy(settings)

        if merge:
            # DEV: This may appear backwards keeping `existing` as the "source" and `settings` as
            #   the "destination", but we do not want to let `_add(..., merge=True)` overwrite any
            #   existing settings
            #
            # >>> config.requests['split_by_domain'] = True
            # >>> config._add('requests', dict(split_by_domain=False))
            # >>> config.requests['split_by_domain']
            # True
            self._config[integration] = deepmerge(existing, settings)
        else:
            self._config[integration] = settings
Internal API that registers an integration with given default
        settings.

        :param str integration: The integration name (i.e. `requests`)
        :param dict settings: A dictionary that contains integration settings;
            to preserve immutability of these values, the dictionary is copied
            since it contains integration defaults.
        :param bool merge: Whether to merge any existing settings with those provided,
            or if we should overwrite the settings with those provided;
            Note: when merging existing settings take precedence.
        
Internal API that registers an integration with given default
settings.
Internal API that registers an integration with given default settings .
def _add(self, integration, settings, merge=True):
        existing = getattr(self, integration)
        settings = deepcopy(settings)
        if merge:
             >>> config.requests['split_by_domain'] = True
             >>> config._add('requests', dict(split_by_domain=False))
             >>> config.requests['split_by_domain']
             True
            self._config[integration] = deepmerge(existing, settings)
        else:
            self._config[integration] = settings
def _add ( self , integration , settings , merge = True ) : existing = getattr ( self , integration ) settings = deepcopy ( settings ) if merge : self . _config [ integration ] = deepmerge ( existing , settings ) else : self . _config [ integration ] = settings
Internal API that registers an integration with given default
settings.
Internal API that registers an integration with given default settings .
"""Internal API that registers an integration with given default
        settings.

        :param str integration: The integration name (i.e. `requests`)
        :param dict settings: A dictionary that contains integration settings;
            to preserve immutability of these values, the dictionary is copied
            since it contains integration defaults.
        :param bool merge: Whether to merge any existing settings with those provided,
            or if we should overwrite the settings with those provided;
            Note: when merging existing settings take precedence.
        """ # DEV: Use `getattr()` to call our `__getattr__` helper # DEV: This may appear backwards keeping `existing` as the "source" and `settings` as #   the "destination", but we do not want to let `_add(..., merge=True)` overwrite any #   existing settings # # >>> config.requests['split_by_domain'] = True # >>> config._add('requests', dict(split_by_domain=False)) # >>> config.requests['split_by_domain'] # True
self
integration
The integration name
The integration name
settings
A dictionary that contains integration settings;
to preserve immutability of these values, the dictionary is copied
since it contains integration defaults.
A dictionary that contains integration settings ; to preserve immutability of these values the dictionary is copied since it contains integration defaults .
merge
Whether to merge any existing settings with those provided,
or if we should overwrite the settings with those provided;
Note: when merging existing settings take precedence.
Whether to merge any existing settings with those provided or if we should overwrite the settings with those provided ; Note : when merging existing settings take precedence .