open-telemetry/opentelemetry-auto-postgresql
Larablocks Analysis
open-telemetry/opentelemetry-auto-postgresql works with any PHP project: the latest release (0.4.1, Sep 2, 2026) doesn't depend on Laravel.
Recommendation checks
Solid choiceSolid choice: maintained and up to date, meets 1 of 3 checks; below the bar for Recommended on use.
- Released in the last 12 months (Sep 2, 2026)
- 5,869 downloads a month (needs 10,000)
- 1 GitHub star (needs 100)
State
Maintained- Last stable release: Sep 2, 2026.
- 2 releases in the last 12 months.
- First released: Jun 29, 2026.
- Monthly downloads: 5,869, up 408% from six months ago.
- 1 open issue on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.
| Install | |
|---|---|
composer require open-telemetry/opentelemetry-auto-postgresql |
|
| Latest Version: | 0.4.1 |
| PHP: | ^8.2 |
| License: | Apache-2.0 |
| Last Updated: | Nov 14, 2026 |
| Links: | GitHub · Packagist |
This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.
OpenTelemetry PostgreSQL auto-instrumentation
Please read https://opentelemetry.io/docs/instrumentation/php/automatic/ for instructions on how to install and configure the extension and SDK.
Overview
This package provides auto-instrumentation for the PostgreSQL native PHP extension (ext-pgsql).
Hooks are registered via Composer, and client spans are automatically created for key database operations.
Supported functions include:
Connection
pg_connectpg_pconnect
Queries
pg_querypg_query_paramspg_send_querypg_send_query_paramspg_get_result
Prepared Statements
pg_preparepg_send_preparepg_executepg_send_execute
Table/Row Operations
pg_insertpg_selectpg_updatepg_delete
COPY
pg_copy_frompg_copy_to
Large Objects (LOB)
pg_lo_createpg_lo_openpg_lo_writepg_lo_readpg_lo_read_allpg_lo_unlinkpg_lo_importpg_lo_export
Configuration
Disabling PostgreSQL instrumentation
The extension can be disabled via runtime configuration:
OTEL_PHP_DISABLED_INSTRUMENTATIONS=postgresql
Database Context Propagation
Enable context propagation for database queries by installing the following packages:
composer require open-telemetry/opentelemetry-sqlcommenter
Currently, only the following functions support context propagation:
pg_querypg_send_query
Compatibility
PHP 8.2 or newer is required
Alternatives to open-telemetry/opentelemetry-auto-postgresql
Collector-free telemetry for Laravel: Prometheus metrics, OTLP traces and events...
Seamless integration of Langfuse observability for Laravel and Laravel Prism.
OpenTelemetry tracing for the Laravel AI SDK, following the OpenTelemetry GenAI...
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| 0.4.1 | ^8.2 | Apache-2.0 | |
| 0.4.0 | ^8.2 | Apache-2.0 |