Skip to content

Commit 3a7b670

Browse files
Uuid4 replaced with Uuid7
1 parent 8867b23 commit 3a7b670

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/TrackerRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function getTraceId(): string
6868
return $id;
6969
}
7070

71-
return (new UuidFactory)->uuid4()->toString();
71+
return (new UuidFactory)->uuid7()->toString();
7272
}
7373

7474
public function custom(string $header, Closure $callback): static

tests/Unit/Request/TrackIdTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
$telemetry = new TrackerRequest($request, $header);
2020
$generated = $telemetry->getTraceId();
2121
expect(Uuid::isValid($generated))->toBeTrue()
22-
->and(Uuid::fromString($generated)->getVersion())->toBe(4);
22+
->and(Uuid::fromString($generated)->getVersion())->toBe(7);
2323

2424
// 3) traceId() without param sets header using getTraceId()
2525
$telemetry->traceId();

0 commit comments

Comments
 (0)