Skip to content

condorcet/asyncpg-opentracing

Repository files navigation

OpenTracing Badge

Asyncpg Opentracing

This package provides opentracing supporting for applications using asyncpg library.

Insallation

$ pip install asyncpg_opentracing

Example of usage

To activate tracing of SQL commands:

  1. Wrap your connection class with tracing_connection:
from asyncpg.connection import Connection
from asyncpg_opentracing import tracing_connection

@tracing_connection
class MyConnection(Connection):
    pass
  1. Pass it as connection_class to the connect function:
await asyncpg.connect(user='user', password='password', database='database',
                      connection_class=MyConnection)

or to the create_pool function:

await asyncpg.create_pool(user='user', password='password', database='database',
                          connection_class=MyConnection)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages