MCPcopy
hub / github.com/grafana/tempo / randFrom

Function randFrom

pkg/util/trace_info.go:418–420  ·  view source on GitHub ↗
(r *rand.Rand, s []T)

Source from the content-addressed store, hash-verified

416}
417
418func randFrom[T any](r *rand.Rand, s []T) T {
419 return s[r.Intn(len(s))]
420}
421
422func newRand(t time.Time) *rand.Rand {
423 return rand.New(rand.NewSource(t.UnixNano())) // nolint:gosec // G404: Use of weak random number generator

Callers 1

RandomAttrFromTraceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected