You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This generally has a far larger impact on the CPU usage of a user's app than normal random (I've seen 10% of CPU used on ID generation before when using crypto random). You can see some benchmarks and discussion for JS here
It'd probably be good to use normal random here too, like in JS, Java, Python (when I filed the JS issue, I misread the Go code thinking it was already using normal random ;) ).
I'm not sure this change is useful. We're currently only using the crypto/rand package for obtaining seed data for a PRNG from the math/rand package. ID generation is performed with a PRNG from the math/rand package already.
Currently, cryptographic randoms are used for IDs I think.
https://github.com/open-telemetry/opentelemetry-go/blob/master/sdk/trace/trace.go#L18
This generally has a far larger impact on the CPU usage of a user's app than normal random (I've seen 10% of CPU used on ID generation before when using crypto random). You can see some benchmarks and discussion for JS here
open-telemetry/opentelemetry-js#1334
It'd probably be good to use normal random here too, like in JS, Java, Python (when I filed the JS issue, I misread the Go code thinking it was already using normal random ;) ).
/cc @wilguo
The text was updated successfully, but these errors were encountered: