This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.
Please read https://opentelemetry.io/docs/instrumentation/php/automatic/ for instructions on how to install and configure the extension and SDK.
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:
pg_connectpg_pconnect
pg_querypg_query_paramspg_send_querypg_send_query_paramspg_get_result
pg_preparepg_send_preparepg_executepg_send_execute
pg_insertpg_selectpg_updatepg_delete
pg_copy_frompg_copy_to
pg_lo_createpg_lo_openpg_lo_writepg_lo_readpg_lo_read_allpg_lo_unlinkpg_lo_importpg_lo_export
The extension can be disabled via runtime configuration:
OTEL_PHP_DISABLED_INSTRUMENTATIONS=postgresqlEnable context propagation for database queries by installing the following packages:
composer require open-telemetry/opentelemetry-sqlcommenterCurrently, only the following functions support context propagation:
pg_querypg_send_query
PHP 8.2 or newer is required