Environment
PHP 8.4.19
apm-agent-php 1.15.1
Laravel 13.14.0
PostgreSQL via ext-pdo_pgsql
Describe the bug
After upgrading to PHP 8.4, DB spans in Kibana APM show span.subtype = unknown_DB instead of postgresql. Service Map no longer shows PostgreSQL as a dependency. Redis spans are unaffected.
To Reproduce
- PHP 8.4 + ext-pdo_pgsql + apm-agent-php 1.15.1
- Run:
$pdo = PDO::connect('pgsql:host=localhost;dbname=test', 'user', 'pass');
$pdo->query('SELECT 1');
- Open the resulting DB span in Kibana APM.
Expected behavior
span.subtype = "postgresql", connection visible as PostgreSQL dependency in Service Map.
Actual behavior
span.subtype = "unknown_DB".
Possible cause
PHP 8.4 introduced driver-specific PDO subclasses (RFC) — new PDO('pgsql:...') now returns a Pdo\Pgsql instance instead of plain PDO. The agent hooks PDO methods by the hardcoded class name 'PDO', so the constructor interceptor does not fire on the subclass, the DSN is never parsed, and dbType falls back to unknown_DB. Likely affects all PHP 8.4 PDO subclasses (Pdo\Mysql, Pdo\Sqlite, etc.).
Environment
PHP 8.4.19
apm-agent-php 1.15.1
Laravel 13.14.0
PostgreSQL via ext-pdo_pgsql
Describe the bug
After upgrading to PHP 8.4, DB spans in Kibana APM show span.subtype = unknown_DB instead of postgresql. Service Map no longer shows PostgreSQL as a dependency. Redis spans are unaffected.
To Reproduce
Expected behavior
span.subtype = "postgresql", connection visible as PostgreSQL dependency in Service Map.
Actual behavior
span.subtype = "unknown_DB".
Possible cause
PHP 8.4 introduced driver-specific PDO subclasses (RFC) — new PDO('pgsql:...') now returns a Pdo\Pgsql instance instead of plain PDO. The agent hooks PDO methods by the hardcoded class name 'PDO', so the constructor interceptor does not fire on the subclass, the DSN is never parsed, and dbType falls back to unknown_DB. Likely affects all PHP 8.4 PDO subclasses (Pdo\Mysql, Pdo\Sqlite, etc.).