pub fn get_run_id() -> &'static strExpand description
Returns the unique run ID for this application session.
The run ID is a UUID v7 generated at first access and remains constant for the lifetime of the process. It is used to:
- Name the log file:
cadmus-<run_id>.json - Tag OpenTelemetry telemetry exports
- Correlate all operations within a single run
§Returns
A string slice containing the run ID, valid for the program’s lifetime.
§Example
use cadmus_core::logging::get_run_id;
let run_id = get_run_id();
eprintln!("Application run ID: {}", run_id);
assert_eq!(get_run_id(), run_id); // Consistent across calls