- /*
- * We don't need cryptographic quality randomness to
- * generate UUIDs, seed rand with the epoch.
- */
- const time_t epoch = time(NULL);
-
- if (epoch == (time_t) -1) {
+ try {
+ srand(lttng::random::produce_best_effort_random_seed());
+ } catch (const std::exception& e) {
+ ERR("Failed to initialize random seed during generation of UUID: %s",
+ e.what());