Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/TrackerRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace DragonCode\RequestTracker;

use Closure;
use Ramsey\Uuid\UuidFactory;
use Symfony\Component\HttpFoundation\Request;

use function in_array;
Expand Down Expand Up @@ -70,7 +69,7 @@ public function getTraceId(): string
return $id;
}

return (new UuidFactory)->uuid7()->toString();
return TrackerUuid::get();
}

public function custom(string $header, Closure $callback): static
Expand Down
15 changes: 15 additions & 0 deletions src/TrackerUuid.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace DragonCode\RequestTracker;

use Ramsey\Uuid\UuidFactory;

class TrackerUuid
{
public static function get(): string
{
return (new UuidFactory)->uuid7()->toString();
}
}