Definition
/**
* Create a TraceId.
*
* If a hex string is provided, creates a TraceId from it.
* Otherwise, generates a new random TraceId.
*
* @param null|string $hex Optional 32-character hexadecimal string
*
* @throws \InvalidArgumentException if the hex string is invalid
*/
trace_id(?string $hex) : TraceId