Skip to content

Commit

Permalink
Merge pull request #12 from bethinkpl/normalize-uuid-in-path
Browse files Browse the repository at this point in the history
Normalize UUID the same way as numeric
  • Loading branch information
rogatty authored Jan 21, 2021
2 parents 07d1fbd + e6230b6 commit cdca002
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 cdca002

Please sign in to comment.