Skip to content

Files

Latest commit

Feb 8, 2025
198602e · Feb 8, 2025

History

History
19 lines (13 loc) · 435 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 435 Bytes

OTLP-PSQLPy

This library allows tracing PostgreSQL queries made by the psqlpy library.

Usage

import psqlpy
from otlp_psqlpy import PSQLPyPGInstrumentor

# You can optionally pass a custom TracerProvider to PSQLPyPGInstrumentor.instrument()
PSQLPyPGInstrumentor().instrument()

async def main():
    pool = psqlpy.ConnectionPool()
    conn = await pool.connection()

    await conn.execute("SELECT * FROM psqlpy")