コード例 #1
0
def instrument_pymssql(module):
    # XXX Don't believe MSSQL provides a simple means of doing an
    # explain plan using one SQL statement prefix, eg., 'EXPLAIN'.

    register_database_client(module, 'MSSQL', 'single')

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #2
0
def instrument_psycopg2(module):
    register_database_client(module, database_name='Postgres',
            quoting_style='single', explain_query='explain',
            explain_stmts=('select', 'insert', 'update', 'delete'),
            instance_name=instance_name)

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #3
0
ファイル: database_psycopg2.py プロジェクト: GbalsaC/bitnamiP
def instrument_psycopg2(module):
    register_database_client(module, database_name='Postgres',
            quoting_style='single', explain_query='explain',
            explain_stmts=('select', 'insert', 'update', 'delete'),
            instance_name=instance_name)

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #4
0
def instrument_sqlite3_dbapi2(module):
    register_database_client(module,
                             'SQLite',
                             'single',
                             instance_name=instance_name)

    wrap_object(module, 'connect', ConnectionFactory, (module, ))
コード例 #5
0
def instrument_postgresql_driver_dbapi20(module):
    register_database_client(module, database_product='Postgres',
            quoting_style='single', explain_query='explain',
            explain_stmts=('select', 'insert', 'update', 'delete'),
            instance_info=instance_info)

    from .database_psycopg2 import ConnectionFactory

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #6
0
ファイル: database_ibm_db_dbi.py プロジェクト: Ojenge/Afya
def instrument_ibm_db_dbi(module):
    register_database_client(module,
                             database_product='IBMDB2',
                             quoting_style='single',
                             explain_query='EXPLAIN',
                             explain_stmts=('select', 'insert', 'update',
                                            'delete'))

    wrap_object(module, 'connect', ConnectionFactory, (module, ))
コード例 #7
0
def instrument_postgresql_interface_proboscis_dbapi2(module):
    register_database_client(module, database_name='Postgres',
            quoting_style='single', explain_query='explain',
            explain_stmts=('select', 'insert', 'update', 'delete'),
            instance_name=instance_name)

    from .database_dbapi2 import ConnectionFactory

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #8
0
def instrument_pymssql(module):
    # XXX Don't believe MSSQL provides a simple means of doing an
    # explain plan using one SQL statement prefix, eg., 'EXPLAIN'.

    register_database_client(module,
                             database_name='MSSQL',
                             quoting_style='single')

    wrap_object(module, 'connect', ConnectionFactory, (module, ))
コード例 #9
0
ファイル: database_sqlite.py プロジェクト: Arable/evepod
def instrument_sqlite3(module):
    # This case is to handle where the sqlite3 module was already
    # imported prior to agent initialization. In this situation, a
    # reference to the connect() method would already have been created
    # which referred to the uninstrumented version of the function
    # originally imported by sqlite3.dbapi2 before instrumentation could
    # be applied.

    if not isinstance(module.connect, ConnectionFactory):
        register_database_client(module, 'SQLite')

        wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #10
0
def instrument_postgresql_interface_proboscis_dbapi2(module):
    register_database_client(module,
                             database_name='Postgres',
                             quoting_style='single',
                             explain_query='explain',
                             explain_stmts=('select', 'insert', 'update',
                                            'delete'),
                             instance_name=instance_name)

    from .database_dbapi2 import ConnectionFactory

    wrap_object(module, 'connect', ConnectionFactory, (module, ))
コード例 #11
0
def instrument_sqlite3(module):
    # This case is to handle where the sqlite3 module was already
    # imported prior to agent initialization. In this situation, a
    # reference to the connect() method would already have been created
    # which referred to the uninstrumented version of the function
    # originally imported by sqlite3.dbapi2 before instrumentation could
    # be applied.

    if not isinstance(module.connect, ConnectionFactory):
        register_database_client(module, 'SQLite')

        wrap_object(module, 'connect', ConnectionFactory, (module, ))
コード例 #12
0
def instrument_postgresql_driver_dbapi20(module):
    register_database_client(module,
                             database_product='Postgres',
                             quoting_style='single',
                             explain_query='explain',
                             explain_stmts=('select', 'insert', 'update',
                                            'delete'),
                             instance_info=instance_info)

    from .database_psycopg2 import ConnectionFactory

    wrap_object(module, 'connect', ConnectionFactory, (module, ))
コード例 #13
0
def instrument_mysql_connector(module):
    register_database_client(module, "MySQL", "single+double", "explain", ("select",))

    wrap_object(module, "connect", ConnectionFactory, (module,))

    # The connect() function is actually aliased with Connect() and
    # Connection, the later actually being the Connection type object.
    # Instrument Connect(), but don't instrument Connection in case that
    # interferes with direct type usage. If people are using the
    # Connection object directly, they should really be using connect().

    if hasattr(module, "Connect"):
        wrap_object(module, "Connect", ConnectionFactory, (module,))
コード例 #14
0
def instrument(module):
    """"""

    agent.register_database_client(
        module,
        database_product='Postgres',
        quoting_style='single+dollar',
        # explain_query='explain',
        # explain_stmts=('select', 'insert', 'update', 'delete'),
    )

    agent.wrap_object(module, 'connection.connect', ConnectionFactory, (module,))
    agent.wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #15
0
def instrument_mysqldb(module):
    register_database_client(module, 'MySQL', 'single+double', 'explain',
                             ('select', ))

    wrap_object(module, 'connect', ConnectionFactory, (module, ))

    # The connect() function is actually aliased with Connect() and
    # Connection, the later actually being the Connection type object.
    # Instrument Connect(), but don't instrument Connection in case that
    # interferes with direct type usage. If people are using the
    # Connection object directly, they should really be using connect().

    if hasattr(module, 'Connect'):
        wrap_object(module, 'Connect', ConnectionFactory, (module, ))
コード例 #16
0
def instrument_mysql_connector(module):
    register_database_client(module, database_name='MySQL',
            quoting_style='single+double', explain_query='explain',
            explain_stmts=('select',), instance_name=instance_name)

    wrap_object(module, 'connect', ConnectionFactory, (module,))

    # The connect() function is actually aliased with Connect() and
    # Connection, the later actually being the Connection type object.
    # Instrument Connect(), but don't instrument Connection in case that
    # interferes with direct type usage. If people are using the
    # Connection object directly, they should really be using connect().

    if hasattr(module, 'Connect'):
        wrap_object(module, 'Connect', ConnectionFactory, (module,))
コード例 #17
0
def instrument_oursql(module):
    register_database_client(module, database_name='MySQL',
            quoting_style='single+double', explain_query='explain',
            explain_stmts=('select',), instance_name=instance_name)

    wrap_object(module, 'connect', ConnectionFactory, (module,))

    # The connect() function is actually aliased with Connect() and
    # Connection, the later actually being the Connection type object.
    # Instrument Connect(), but don't instrument Connection in case that
    # interferes with direct type usage. If people are using the
    # Connection object directly, they should really be using connect().

    if hasattr(module, 'Connect'):
        wrap_object(module, 'Connect', ConnectionFactory, (module,))
コード例 #18
0
def instrument_cx_oracle(module):
    register_database_client(module, database_product='Oracle',
            quoting_style='single')

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #19
0
def instrument_sqlite3_dbapi2(module):
    register_database_client(module, "SQLite", "single")

    wrap_object(module, "connect", ConnectionFactory, (module,))
コード例 #20
0
def wrap_memcache_single(module, object_path, product, target, operation):
    wrap_object(module.Client, object_path, MemcacheSingleWrapper,
            (product, target, operation, module))
コード例 #21
0
def instrument_pyodbc(module):
    register_database_client(module, database_name='ODBC',
            quoting_style='single')

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #22
0
def instrument(module):
    register_database_client(module, "DBAPI2", "single")

    wrap_object(module, "connect", ConnectionFactory, (module,))
コード例 #23
0
def instrument_cx_oracle(module):
    register_database_client(module, database_name='Oracle',
            quoting_style='single')

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #24
0
def instrument_psycopg2(module):
    register_database_client(module, 'PostgreSQL', 'single',
            'explain', ('select', 'insert', 'update', 'delete'))

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #25
0
ファイル: database_sqlite.py プロジェクト: Arable/evepod
def instrument_sqlite3_dbapi2(module):
    register_database_client(module, 'SQLite', 'single')

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #26
0
ファイル: database_dbapi2.py プロジェクト: Arable/evepod
def instrument(module):
    register_database_client(module, 'DBAPI2', 'single')

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #27
0
def instrument(module):
    register_database_client(module, 'DBAPI2', 'single')

    wrap_object(module, 'connect', ConnectionFactory, (module, ))
コード例 #28
0
def instrument_ibm_db_dbi(module):
    register_database_client(module, database_product='IBMDB2',
            quoting_style='single', explain_query='EXPLAIN',
            explain_stmts=('select', 'insert', 'update', 'delete'))

    wrap_object(module, 'connect', ConnectionFactory, (module,))
コード例 #29
0
def instrument_psycopg2(module):
    register_database_client(module, 'PostgreSQL', 'single', 'explain',
                             ('select', 'insert', 'update', 'delete'))

    wrap_object(module, 'connect', ConnectionFactory, (module, ))