OpenCensus SQLAlchemy Integration provides tracing instrumentation for SQLAlchemy queries. It wraps SQLAlchemy engine events to capture spans for each executed query, including bind parameters and execution time. Version 0.1.3 is current, with irregular releases.
pip install opencensus-ext-sqlalchemyVerified import paths — ran on the pinned version, not inferred.
Instrument a SQLAlchemy engine to trace queries.
Apply SQLAlchemyTrace immediately after engine creation, before first use.
Set up OpenCensus tracing with an exporter, e.g., 'from opencensus.trace import tracer as tracer_module' and configure with a sampler and exporter.
Migrate to OpenTelemetry with opentelemetry-instrumentation-sqlalchemy.