--- id: opentelemetry-instrumentation-aiopg version: "0.65b0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # opentelemetry-instrumentation-aiopg — OpenTelemetry aiopg instrumentation License: permissive · Maintenance: active · Downloads: 3.3M/mo ## What it is and what it does This package integrates OpenTelemetry tracing into aiopg, the async PostgreSQL driver for Python. When installed and initialized, it automatically wraps aiopg database calls to emit spans—structured records of database operations—that can be exported to observability platforms for monitoring, debugging, and performance analysis. It sits between your application and aiopg, intercepting queries and connections to record timing, status, and query details. The instrumentation depends on opentelemetry-instrumentation-dbapi for shared database tracing logic and wrapt for non-invasive function wrapping. It is currently in beta (version 0.65b0) and requires Python 3.10 or later. Use it for: - Monitor query latency and database operation timing in async web applications using aiopg. - Correlate database calls with HTTP requests and other services in distributed tracing systems. - Debug slow or failing database operations by examining detailed spans in a tracing backend. - Track database connection pool behavior and identify bottlenecks in async workloads. - Export database metrics to observability platforms like Jaeger or Datadog for centralized monitoring. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds distributed tracing instrumentation for aiopg, an async PostgreSQL driver, to automatically capture and export database operations as OpenTelemetry spans. Yes, if you use aiopg in an async application and need distributed tracing. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it safe to adopt. The beta status is not a blocker—it reflects ongoing refinement, not instability. Install it if observability of your async database layer is a priority; skip it if you have no tracing infrastructure or do not use aiopg. ## Install pip install opentelemetry-instrumentation-aiopg uv add opentelemetry-instrumentation-aiopg poetry add opentelemetry-instrumentation-aiopg ## Installing opentelemetry-instrumentation-aiopg Before you install: Low install friction with four runtime dependencies. Actively maintained as of 2026-08-14 with recent releases. Beta status (0.65b0) indicates the instrumentation is still stabilizing but usable. License in practice: Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions beyond attribution. Quickstart: pip install opentelemetry-instrumentation-aiopg from opentelemetry.instrumentation.aiopg import AiopgInstrumentor AiopgInstrumentor().instrument() Requires Python 3.10 or later; aiopg must be installed and used in an async context; an OpenTelemetry exporter must be configured separately to send traces. Verify before relying: - Whether instrumentation works with all aiopg connection pool patterns or only direct connections. - Performance overhead of tracing in high-throughput async database workloads. - Compatibility with specific OpenTelemetry exporter backends (Jaeger, Datadog, etc.). ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags opentelemetry aiopg instrumentation, async postgres tracing, aiopg distributed tracing, database span instrumentation, opentelemetry database monitoring, aiopg observability, async database tracing, observability, async-postgres, instrumentation [View on SkillFed](https://skillfed.io/packages/opentelemetry-instrumentation-aiopg) · [View on PyPI](https://pypi.org/project/opentelemetry-instrumentation-aiopg/)