Esempio n. 1
0
def unpatch():
    """
    Remove tracing from patched modules.
    """
    if template_module:
        if getattr(aiohttp_jinja2, '__datadog_patch', False):
            setattr(aiohttp_jinja2, '__datadog_patch', False)
            unwrap(aiohttp_jinja2, 'render_template')
Esempio n. 2
0
def unpatch():
    if getattr(redis, '_datadog_patch', False):
        setattr(redis, '_datadog_patch', False)
        unwrap(redis.StrictRedis, 'execute_command')
        unwrap(redis.StrictRedis, 'pipeline')
        unwrap(redis.Redis, 'pipeline')
        unwrap(redis.client.BasePipeline, 'execute')
        unwrap(redis.client.BasePipeline, 'immediate_execute_command')
Esempio n. 3
0
def unpatch():
    if getattr(botocore.client, '_datadog_patch', False):
        setattr(botocore.client, '_datadog_patch', False)
        unwrap(botocore.client.BaseClient, '_make_api_call')
Esempio n. 4
0
def unpatch():
    logger.debug('Unpatching `graphql.graphql` function.')
    unwrap(graphql, 'graphql')
Esempio n. 5
0
def unpatch():
    if getattr(elasticsearch, '_datadog_patch', False):
        setattr(elasticsearch, '_datadog_patch', False)
        unwrap(elasticsearch.transport.Transport, 'perform_request')
Esempio n. 6
0
def unpatch_restframework():
    """ Unpatches rest_framework app."""
    if getattr(APIView, '_datadog_patch', False):
        setattr(APIView, '_datadog_patch', False)
        unwrap(APIView, 'handle_exception')
Esempio n. 7
0
def unpatch():
    logger.debug("Unpatching `graphql.graphql` function.")
    unwrap(graphql, "graphql")
    unwrap(graphql.backend.core, "execute_and_validate")
Esempio n. 8
0
def unpatch():
    if getattr(boto.connection, '_datadog_patch', False):
        setattr(boto.connection, '_datadog_patch', False)
        unwrap(boto.connection.AWSQueryConnection, 'make_request')
        unwrap(boto.connection.AWSAuthConnection, 'make_request')
Esempio n. 9
0
def unpatch():
    # unpatch sqlalchemy
    if getattr(sqlalchemy.engine, '__datadog_patch', False):
        setattr(sqlalchemy.engine, '__datadog_patch', False)
        unwrap(sqlalchemy, 'create_engine')
        unwrap(sqlalchemy.engine, 'create_engine')