Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
asyncpg_opentracing
tests
.gitignore
.travis.yml
CHANGELOG.rst
LICENSE.md
README.rst
requirements-test.txt
setup.cfg
setup.py
tox.ini

README.rst

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)
You can’t perform that action at this time.