| 540 | } |
| 541 | |
| 542 | std::string Trace::new_uuid() { |
| 543 | // RFC 4122 v4 UUID via stduuid. The generator is thread-local to avoid |
| 544 | // contention; each thread seeds its own mt19937 from std::random_device. |
| 545 | static thread_local std::mt19937 engine{std::random_device{}()}; |
| 546 | static thread_local uuids::uuid_random_generator gen{engine}; |
| 547 | return uuids::to_string(gen()); |
| 548 | } |
| 549 | |
| 550 | // --------------------------------------------------------------------------- |
| 551 | // Free function helper |
nothing calls this directly
no outgoing calls
no test coverage detected