trace_sampler

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SamplerStrategyAll = iota
	SamplerStrategyRatio
	SamplerStrategyRateLimit
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Sampler

type Sampler struct {
	// contains filtered or unexported fields
}

func New

func New() *Sampler

func (*Sampler) RefreshConfig

func (s *Sampler) RefreshConfig(config SamplerConfig)

func (*Sampler) Sample

func (s *Sampler) Sample() (bool, int)

type SamplerConfig

type SamplerConfig struct {
	Strategy int
	Value    float64
}

type SamplerStrategy

type SamplerStrategy int

Jump to

Keyboard shortcuts

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