We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1641d81 + 0c15930 commit b7ebcfaCopy full SHA for b7ebcfa
src/TrackerRequest.php
@@ -5,7 +5,6 @@
5
namespace DragonCode\RequestTracker;
6
7
use Closure;
8
-use Ramsey\Uuid\UuidFactory;
9
use Symfony\Component\HttpFoundation\Request;
10
11
use function in_array;
@@ -70,7 +69,7 @@ public function getTraceId(): string
70
69
return $id;
71
}
72
73
- return (new UuidFactory)->uuid7()->toString();
+ return TrackerUuid::get();
74
75
76
public function custom(string $header, Closure $callback): static
src/TrackerUuid.php
@@ -0,0 +1,15 @@
1
+<?php
2
+
3
+declare(strict_types=1);
4
+namespace DragonCode\RequestTracker;
+use Ramsey\Uuid\UuidFactory;
+class TrackerUuid
+{
+ public static function get(): string
12
+ {
13
+ return (new UuidFactory)->uuid7()->toString();
14
+ }
15
+}
0 commit comments