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

Method Sample

sampler.go:22–22  ·  view source on GitHub ↗

Sample returns true if the event should be part of the sample, false if the event should be dropped.

(lvl Level)

Source from the content-addressed store, hash-verified

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,

Callers 10

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
shouldMethod · 0.65
SampleFunction · 0.65

Implementers 4

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

Calls

no outgoing calls

Tested by 6

ExampleLogger_SampleFunction · 0.52
TestSamplingFunction · 0.52
TestDisableSamplingFunction · 0.52
TestSamplersFunction · 0.52
BenchmarkSamplersFunction · 0.52
ExampleLogger_SampleFunction · 0.52