Sampler defines an interface to a log sampler.
| 17 | |
| 18 | // Sampler defines an interface to a log sampler. |
| 19 | type Sampler interface { |
| 20 | // Sample returns true if the event should be part of the sample, false if |
| 21 | // the event should be dropped. |
| 22 | Sample(lvl Level) bool |
| 23 | } |
| 24 | |
| 25 | // RandomSampler use a PRNG to randomly sample an event out of N events, |
| 26 | // regardless of their level. |
no outgoing calls
no test coverage detected