[FEATURE] Add support for `v7` UUID in `RequestId`
NishantJoshi00 opened this issue · 3 comments
Description
Currently, the request ID is generated using v4
, which effectively addresses the common use-case of ensuring unique IDs within a specific range. However, when assessing use-cases that involve storing request IDs as sorting keys for analytics using v4
, scalability becomes a concern. In contrast, v7
offers a time-dependent prefix that facilitates the chronological sorting of requests, offering an additional advantage of enhancing locality.
Implementation
- I am willing to submit a PR
This change, however, introduces some added complexities:
- Currently, the
uuid
crate requires passingunstable_uuid
as a configuration flag. - This modification may conflict with any existing use cases in projects that use this crate. Therefore, it can be placed under an optional (non-default) feature flag.
I'm open to the idea of adding it as an optional off-by-default feature, as long as we don't break semver.
I agree, I don't consider it to be default feature either, as the current implementation of uuid
contains caveats on enabling v7
feature flag.
Implemented in #116.