diff --git a/go/streamlog/streamlog.go b/go/streamlog/streamlog.go index d376e5b28ea..40d33b840b4 100644 --- a/go/streamlog/streamlog.go +++ b/go/streamlog/streamlog.go @@ -264,7 +264,7 @@ func shouldSampleQuery() bool { } else if queryLogSampleRate >= 1 { return true } - return rand.Float64() < queryLogSampleRate + return rand.Float64() <= queryLogSampleRate } // ShouldEmitLog returns whether the log with the given SQL query