def instrument_bmemcached_client(module):
    for name in _memcache_client_methods:
        if hasattr(module.Client, name):
            wrap_datastore_trace(module.Client,
                                 name,
                                 product='Memcached',
                                 target=None,
                                 operation=name)
Exemple #2
0
def instrument_cyclone_redis(module):

    for name in _redis_client_methods:
        if name in vars(module.RedisProtocol):
            wrap_datastore_trace(module.RedisProtocol,
                                 name,
                                 product='Redis',
                                 target=None,
                                 operation=name)
def instrument_pymongo_collection(module):

    def _collection_name(collection, *args, **kwargs):
        return collection.name

    for name in _pymongo_client_methods:
        if hasattr(module.Collection, name):
            wrap_datastore_trace(module.Collection, name, product='MongoDB',
                    target=_collection_name, operation=name)
Exemple #4
0
def instrument_pymongo_collection(module):
    def _collection_name(collection, *args, **kwargs):
        return collection.name

    for name in _pymongo_client_methods:
        if hasattr(module.Collection, name):
            wrap_datastore_trace(module.Collection,
                                 name,
                                 product='MongoDB',
                                 target=_collection_name,
                                 operation=name)
Exemple #5
0
def instrument_redis_client(module):
    if hasattr(module, 'StrictRedis'):
        for name in _redis_client_methods:
            if name in vars(module.StrictRedis):
                wrap_datastore_trace(module.StrictRedis,
                                     name,
                                     product='Redis',
                                     target=None,
                                     operation=name)

    if hasattr(module, 'Redis'):
        for name in _redis_client_methods:
            if name in vars(module.Redis):
                wrap_datastore_trace(module.Redis,
                                     name,
                                     product='Redis',
                                     target=None,
                                     operation=name)
def instrument_pymemcache_client(module):
    for name in _memcache_client_methods:
        if hasattr(module.Client, name):
            wrap_datastore_trace(module.Client, name,
                    product='Memcached', target=None, operation=name)
Exemple #7
0
def instrument_cyclone_redis(module):

    for name in _redis_client_methods:
        if name in vars(module.RedisProtocol):
            wrap_datastore_trace(module.RedisProtocol, name,
                product='Redis', target=None, operation=name)