skillfed

opentelemetry-instrumentation-psycopg2

OpenTelemetry psycopg2 instrumentation

opentelemetry-instrumentation-psycopg2 Permissive license Apache-2.0 Active 1,086 v0.65b0 released

Install

opentelemetry-instrumentation-psycopg2 on PyPI

pip

pip install opentelemetry-instrumentation-psycopg2

uv

uv add opentelemetry-instrumentation-psycopg2

poetry

poetry add opentelemetry-instrumentation-psycopg2

Package 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

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
psycopg2 tracingopentelemetry database instrumentationpostgresql observabilitysql query tracingpsycopg2 spansdatabase performance monitoringopentelemetry psycopg2

Similar packages