1
0
mirror of https://github.com/gogf/gf.git synced 2025-04-05 11:18:50 +08:00

fix issue in ut of package internal/tracing

This commit is contained in:
John Guo 2021-12-17 00:11:41 +08:00
parent 8f24dc3549
commit f72ba0b64d

View File

@ -42,7 +42,7 @@ func NewTraceID() (traceID trace.TraceID) {
// NewSpanID creates and returns a span ID.
func NewSpanID() (spanID trace.SpanID) {
copy(spanID[:], gbinary.EncodeInt64(time.Now().UnixMicro()))
copy(spanID[:], gbinary.EncodeInt64(time.Now().UnixNano()/1e3))
copy(spanID[4:], grand.B(4))
return
}