|
ORE Studio 0.0.4
|
Generator for 128-bit trace IDs with embedded metadata. More...
#include <trace_id_generator.hpp>

Public Member Functions | |
| trace_id_generator () | |
| Constructs the generator with locally derived machine ID. | |
| trace_id_generator (std::uint16_t machine_id) | |
| Constructs the generator with an explicit machine ID. | |
| domain::trace_id | operator() () |
| Generates a new trace_id. | |
| std::uint16_t | machine_id () const |
| Gets the machine ID being used by this generator. | |
Generator for 128-bit trace IDs with embedded metadata.
The generated trace_id has the following structure:
This structure provides:
Constructs the generator with locally derived machine ID.
The machine ID is derived from system properties (hostname, MAC address) and remains constant for the lifetime of the process.
|
explicit |
Constructs the generator with an explicit machine ID.
| machine_id | The 16-bit machine identifier. |
| domain::trace_id operator() | ( | ) |
Generates a new trace_id.
Thread-safe: Multiple threads can call this concurrently.