mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 16:18:22 +08:00
revert genTraceId (#314)
This commit is contained in:
committed by
GitHub
parent
7f912a1781
commit
8d3990124e
@@ -805,9 +805,11 @@ class Utils {
|
|||||||
|
|
||||||
StringBuffer randomTraceId = StringBuffer(randomId.substring(0, 24));
|
StringBuffer randomTraceId = StringBuffer(randomId.substring(0, 24));
|
||||||
|
|
||||||
|
int ts = DateTime.now().millisecondsSinceEpoch ~/ 1000;
|
||||||
|
|
||||||
for (int i = 2; i >= 0; i--) {
|
for (int i = 2; i >= 0; i--) {
|
||||||
randomTraceId
|
ts >>= 8;
|
||||||
.write(random.nextInt(256).toRadixString(16).padLeft(2, '0'));
|
randomTraceId.write((ts & 0xFF).toRadixString(16).padLeft(2, '0'));
|
||||||
}
|
}
|
||||||
|
|
||||||
randomTraceId.write(randomId.substring(30, 32));
|
randomTraceId.write(randomId.substring(30, 32));
|
||||||
|
|||||||
Reference in New Issue
Block a user