From f1e7705b345c9bf3826221940bee329610ddf5a5 Mon Sep 17 00:00:00 2001 From: eeliu <27064129+eeliu@users.noreply.github.com> Date: Thu, 11 Jul 2024 15:02:52 +0800 Subject: [PATCH] fix format in pdo8 Plugins --- Changes.md | 8 ++++++++ lib/Pinpoint/Plugins/SysV2/_pdo/pdo8.php | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Changes.md b/Changes.md index 1ce03da..098aa46 100644 --- a/Changes.md +++ b/Changes.md @@ -1,5 +1,13 @@ ## Changes +### v0.3.3 + +* fix dsn on pdo8 + +### v0.3.0 + +* add autoloader plugins + ### v2.1.0 * remove setting.ini diff --git a/lib/Pinpoint/Plugins/SysV2/_pdo/pdo8.php b/lib/Pinpoint/Plugins/SysV2/_pdo/pdo8.php index 3f5c8f6..5a029d1 100644 --- a/lib/Pinpoint/Plugins/SysV2/_pdo/pdo8.php +++ b/lib/Pinpoint/Plugins/SysV2/_pdo/pdo8.php @@ -28,7 +28,8 @@ function ($dsn, $username = null, $password = null, $options = null) use ($weakMap) { $pdo = pinpoint_get_this(); if ($pdo instanceof PDO) { - $weakMap[$pdo] = $dsn; + // fix https://github.com/pinpoint-apm/pinpoint-c-agent/issues/647 + $weakMap[$pdo] = parse_connect_string($dsn)["host"]; } }, function ($ret) {