sample

package
v1.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeterministicSampler

type DeterministicSampler struct {
	Config *config.DeterministicSamplerConfig
	Logger logger.Logger
	// contains filtered or unexported fields
}

func (*DeterministicSampler) GetSampleRate

func (d *DeterministicSampler) GetSampleRate(trace *types.Trace) (rate uint, keep bool, reason string)

func (*DeterministicSampler) Start

func (d *DeterministicSampler) Start() error

type DynamicSampler

type DynamicSampler struct {
	Config  *config.DynamicSamplerConfig
	Logger  logger.Logger
	Metrics metrics.Metrics
	// contains filtered or unexported fields
}

func (*DynamicSampler) GetSampleRate

func (d *DynamicSampler) GetSampleRate(trace *types.Trace) (uint, bool, string)

func (*DynamicSampler) Start

func (d *DynamicSampler) Start() error

type EMADynamicSampler

type EMADynamicSampler struct {
	Config  *config.EMADynamicSamplerConfig
	Logger  logger.Logger
	Metrics metrics.Metrics
	// contains filtered or unexported fields
}

func (*EMADynamicSampler) GetSampleRate

func (d *EMADynamicSampler) GetSampleRate(trace *types.Trace) (uint, bool, string)

func (*EMADynamicSampler) Start

func (d *EMADynamicSampler) Start() error

type RulesBasedSampler

type RulesBasedSampler struct {
	Config  *config.RulesBasedSamplerConfig
	Logger  logger.Logger
	Metrics metrics.Metrics
	// contains filtered or unexported fields
}

func (*RulesBasedSampler) GetSampleRate

func (s *RulesBasedSampler) GetSampleRate(trace *types.Trace) (rate uint, keep bool, reason string)

func (*RulesBasedSampler) Start

func (s *RulesBasedSampler) Start() error

type Sampler

type Sampler interface {
	GetSampleRate(trace *types.Trace) (rate uint, keep bool, reason string)
	Start() error
}

type SamplerFactory

type SamplerFactory struct {
	Config  config.Config   `inject:""`
	Logger  logger.Logger   `inject:""`
	Metrics metrics.Metrics `inject:"genericMetrics"`
}

SamplerFactory is used to create new samplers with common (injected) resources

func (*SamplerFactory) GetSamplerImplementationForKey added in v1.14.0

func (s *SamplerFactory) GetSamplerImplementationForKey(samplerKey string, isLegacyKey bool) Sampler

GetSamplerImplementationForKey returns the sampler implementation for the given samplerKey (dataset for legacy keys, environment otherwise), or nil if it is not defined

type TotalThroughputSampler added in v0.13.0

type TotalThroughputSampler struct {
	Config  *config.TotalThroughputSamplerConfig
	Logger  logger.Logger
	Metrics metrics.Metrics
	// contains filtered or unexported fields
}

func (*TotalThroughputSampler) GetSampleRate added in v0.13.0

func (d *TotalThroughputSampler) GetSampleRate(trace *types.Trace) (uint, bool, string)

func (*TotalThroughputSampler) Start added in v0.13.0

func (d *TotalThroughputSampler) Start() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL