File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
collector/receiver/telemetryapireceiver Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,9 @@ package telemetryapireceiver // import "github.com/open-telemetry/opentelemetry-
1717import (
1818 "context"
1919 crand "crypto/rand"
20- "encoding/binary"
2120 "encoding/json"
2221 "fmt"
2322 "io"
24- "math/rand"
2523 "net/http"
2624 "os"
2725 "strconv"
@@ -104,20 +102,14 @@ func (r *telemetryAPIReceiver) Shutdown(ctx context.Context) error {
104102}
105103
106104func newSpanID () pcommon.SpanID {
107- var rngSeed int64
108- _ = binary .Read (crand .Reader , binary .LittleEndian , & rngSeed )
109- randSource := rand .New (rand .NewSource (rngSeed ))
110105 sid := pcommon.SpanID {}
111- _ , _ = randSource .Read (sid [:])
106+ _ , _ = crand .Read (sid [:])
112107 return sid
113108}
114109
115110func newTraceID () pcommon.TraceID {
116- var rngSeed int64
117- _ = binary .Read (crand .Reader , binary .LittleEndian , & rngSeed )
118- randSource := rand .New (rand .NewSource (rngSeed ))
119111 tid := pcommon.TraceID {}
120- _ , _ = randSource .Read (tid [:])
112+ _ , _ = crand .Read (tid [:])
121113 return tid
122114}
123115
You can’t perform that action at this time.
0 commit comments