mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 17:19:00 +08:00
chore: fixed random number generation to match to maxRandInt
This commit is contained in:
parent
99c0c97c1e
commit
578dafd1ff
@ -39,9 +39,9 @@ var once sync.Once
|
||||
|
||||
func (a *Telemetry) IsSampled() bool {
|
||||
|
||||
number := a.minRandInt + rand.Intn(a.maxRandInt-a.minRandInt)
|
||||
random_number := a.minRandInt + rand.Intn(a.maxRandInt-a.minRandInt) + 1
|
||||
|
||||
if (number % a.maxRandInt) == 0 {
|
||||
if (random_number % a.maxRandInt) == 0 {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
|
Loading…
x
Reference in New Issue
Block a user