opentelemetry-instrumentation-psycopg2
OpenTelemetry psycopg2 instrumentation
Install
opentelemetry-instrumentation-psycopg2 on PyPI
pip
pip install opentelemetry-instrumentation-psycopg2uv
uv add opentelemetry-instrumentation-psycopg2poetry
poetry add opentelemetry-instrumentation-psycopg2Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — opentelemetry-api, opentelemetry-instrumentation-dbapi, opentelemetry-instrumentation |
| Maintenance | actively maintained — 28 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: opentelemetry_instrumentation_psycopg2-0.65b0-py3-none-any.whl
About opentelemetry-instrumentation-psycopg2
from the package's own PyPI description — quoted content, verbatim
OpenTelemetry Psycopg2 Instrumentation
|pypi|
.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-psycopg2.svg :target: https://pypi.org/project/opentelemetry-instrumentation-psycopg2/
Installation
::
pip install opentelemetry-instrumentation-psycopg2
References
OpenTelemetry Psycopg2 Instrumentation <https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/psycopg2/psycopg2.html>_OpenTelemetry Project <https://opentelemetry.io/>_OpenTelemetry Python Examples <https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples>_
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Automatically instruments psycopg2 database connections to emit OpenTelemetry traces, capturing SQL queries and database operations for observability.
Low friction: pure Python wheel with three stable OpenTelemetry runtime dependencies. Actively maintained with a recent release (28 days old) and ongoing repository activity.
Apache-2.0 permissive license allows free use, modification, and distribution in both open-source and proprietary projects with minimal restrictions.
Usage
pip install opentelemetry-instrumentation-psycopg2
from opentelemetry.instrumentation.psycopg2 import Psycopg2Instrumentor
Psycopg2Instrumentor().instrument()
Requires Python 3.10 or later; psycopg2 must be installed separately for instrumentation to have an effect.
Verdict: A well-maintained, actively developed instrumentation library in beta status with no known vulnerabilities and permissive licensing. Low install friction and broad Python 3.10+ support make it suitable for production observability pipelines, though its beta classification warrants monitoring for API changes.
Needs verification
- Whether the 0.65b0 beta version indicates planned breaking changes before 1.0 release
- Compatibility matrix with specific psycopg2 versions (2.x vs 3.x)
- Performance overhead of instrumentation in high-throughput scenarios
Similar packages
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-djangopermissive · top 1,000 on PyPI
opentelemetry-instrumentation-sqlalchemypermissive · top 1,000 on PyPI
opentelemetry-instrumentation-fastapipermissive · top 1,000 on PyPI
opentelemetry-instrumentation-aiohttp-clientpermissive · top 1,000 on PyPI
opentelemetry-instrumentation-redispermissive · top 1,000 on PyPI
opentelemetry-instrumentation-loggingpermissive · top 1,000 on PyPI
opentelemetry-instrumentation-flaskpermissive · top 1,000 on PyPI
opentelemetry-instrumentation-requestspermissive · top 1,000 on PyPI
opentelemetry-instrumentation-urllib3permissive · top 1,000 on PyPI