http-rs / http-types

Common types for HTTP operations
https://docs.rs/http-types
Apache License 2.0
200 stars 84 forks source link

trace context randomness #357

Closed alexwennerberg closed 3 years ago

alexwennerberg commented 3 years ago

The rand crate generates cryptographically secure random numbers. As a result, it is slower, slower to build, and has a larger dependency tree. To my understanding of the Trace Context spec (https://www.w3.org/TR/trace-context/#privacy-of-traceparent-field), cryptographic security is not necessary for this field. This library can replace rand with a simpler crate, like fastrand: https://crates.io/crates/fastrand

Let me know what you think!

Fishrock123 commented 3 years ago

Merged: https://github.com/http-rs/http-types/pull/358