We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 439bfa6 commit f7ff2d7Copy full SHA for f7ff2d7
src/Instrumentation/PDO/src/PDOInstrumentation.php
@@ -70,8 +70,11 @@ public static function register(): void
70
71
$dsn = $params[0] ?? '';
72
73
- $attributes = $pdoTracker->trackPdoAttributes($object, $dsn);
74
- $span->setAttributes($attributes);
+ // guard against PDO::connect returning a string
+ if ($result instanceof PDO) {
75
+ $attributes = $pdoTracker->trackPdoAttributes($result, $dsn);
76
+ $span->setAttributes($attributes);
77
+ }
78
79
self::end($exception);
80
}
0 commit comments