MCPcopy
hub / github.com/rs/zerolog / Sampler

Interface Sampler

sampler.go:19–23  ·  sampler.go::Sampler

Sampler defines an interface to a log sampler.

Source from the content-addressed store, hash-verified

17
18// Sampler defines an interface to a log sampler.
19type 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.

Callers 8

ExampleLogger_SampleFunction · 0.65
TestSamplingFunction · 0.65
TestDisableSamplingFunction · 0.65
TestSamplersFunction · 0.65
BenchmarkSamplersFunction · 0.65
ExampleLogger_SampleFunction · 0.65
SampleMethod · 0.65
SampleMethod · 0.65

Implementers 4

Loggerlog.go
BasicSamplersampler.go
BurstSamplersampler.go
LevelSamplersampler.go

Calls

no outgoing calls

Tested by

no test coverage detected