Skip to content

Commit

Permalink
Normalize UUID the same way as numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
rogatty committed Jan 21, 2021
1 parent 07d1fbd commit e6230b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Middleware/RecordTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use PhilKra\Agent;
use PhilKra\ElasticApmLaravel\Events\Span;
use PhilKra\Helper\Timer;
use Ramsey\Uuid\Uuid;

class RecordTransaction
{
Expand Down Expand Up @@ -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("/");
}

Expand Down

0 comments on commit e6230b6

Please sign in to comment.