Closed tsondergaard closed 4 years ago
Many thanks for finding this issue @tsondergaard
I completely agree that there is not point in using UUID V4 for cls-rtracer
, especially considering the sync call that happens in uuid/v4
. Going to fix this defect and ship it in 1.4.0 today.
Running node with --trace-sync-io for an application that uses cls-rtracer outputs warnings such as this one:
Using a synchronous API is undesirable even if the randomBytes() function is normally very fast. If for no other reason, just for the fact that it makes --trace-sync-io much less useful when cls-rtracer creates a lot of noise.
I would expect that a UUID V1 should be plenty good enough for cls-rtracer. uuid.v1() is 5 times faster than uuid.v4() and does not trigger the "WARNING: Detected use of sync API" when run with --trace-sync-io as demonstrated by this little experiment: