From e6230b6da7cb12b82b371aa0c538e96bae06f1c1 Mon Sep 17 00:00:00 2001 From: rogatty <7030884+rogatty@users.noreply.github.com> Date: Thu, 21 Jan 2021 13:10:50 +0100 Subject: [PATCH] Normalize UUID the same way as numeric --- src/Middleware/RecordTransaction.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Middleware/RecordTransaction.php b/src/Middleware/RecordTransaction.php index 8e67965..48a87e1 100644 --- a/src/Middleware/RecordTransaction.php +++ b/src/Middleware/RecordTransaction.php @@ -7,6 +7,7 @@ use PhilKra\Agent; use PhilKra\ElasticApmLaravel\Events\Span; use PhilKra\Helper\Timer; +use Ramsey\Uuid\Uuid; class RecordTransaction { @@ -180,7 +181,7 @@ protected function getNormalizedTransactionName(\Illuminate\Http\Request $reques $tok = strtok($path, '/'); while ($tok !== false) { - $parts[] = is_numeric($tok) ? 'N' : $tok; + $parts[] = is_numeric($tok) || Uuid::isValid($tok) ? 'N' : $tok; $tok = strtok("/"); }