Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

Packages

No packages published

Languages