Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdaptiveSampler ¶
func NewAdaptiveSampler(opts ...AdaptiveSamplerOption) trace.Sampler
NewAdaptiveSampler creates a new adaptive sampler.
Types ¶
type AdaptiveSampler ¶
type AdaptiveSampler struct {
// contains filtered or unexported fields
}
AdaptiveSampler implements adaptive sampling based on span status and duration.
func (*AdaptiveSampler) Description ¶
func (s *AdaptiveSampler) Description() string
Description returns sampler description.
func (*AdaptiveSampler) ShouldSample ¶
func (s *AdaptiveSampler) ShouldSample(p trace.SamplingParameters) trace.SamplingResult
ShouldSample implements trace.Sampler interface.
type AdaptiveSamplerOption ¶
type AdaptiveSamplerOption func(*AdaptiveSampler)
AdaptiveSamplerOption configures an adaptive sampler.
func WithBaselineRate ¶
func WithBaselineRate(rate float64) AdaptiveSamplerOption
WithBaselineRate sets the baseline sampling rate (0.0 to 1.0).
func WithErrorRate ¶
func WithErrorRate(rate float64) AdaptiveSamplerOption
WithErrorRate sets the error sampling rate (default 1.0 = 100%).
func WithSlowRate ¶
func WithSlowRate(rate float64) AdaptiveSamplerOption
WithSlowRate sets the slow operation sampling rate (default 1.0 = 100%).
func WithSlowThreshold ¶
func WithSlowThreshold(thresholdNano int64) AdaptiveSamplerOption
WithSlowThreshold sets the slow operation threshold in nanoseconds.
Click to show internal directories.
Click to hide internal directories.