Documentation
¶
Index ¶
- Constants
- func AddFlags(flagSet *flag.FlagSet)
- func NewProvider(options Options, logger *zap.Logger) (samplingstrategy.Provider, error)
- type Factory
- func (*Factory) AddFlags(flagSet *flag.FlagSet)
- func (*Factory) Close() error
- func (f *Factory) CreateStrategyProvider() (samplingstrategy.Provider, samplingstrategy.Aggregator, error)
- func (f *Factory) InitFromViper(v *viper.Viper, _ *zap.Logger)
- func (f *Factory) Initialize(_ metrics.Factory, _ storage.SamplingStoreFactory, logger *zap.Logger) error
- type Options
Constants ¶
View Source
const ( // DefaultSamplingProbability is the default value for "DefaultSamplingProbability" // used by the Strategy Store in case no DefaultSamplingProbability is defined DefaultSamplingProbability = 0.001 )
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
NewProvider creates a strategy store that holds static sampling strategies.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory implements samplingstrategy.Factory for a static strategy store.
func (*Factory) CreateStrategyProvider ¶
func (f *Factory) CreateStrategyProvider() (samplingstrategy.Provider, samplingstrategy.Aggregator, error)
CreateStrategyProvider implements samplingstrategy.Factory
func (*Factory) InitFromViper ¶
InitFromViper implements storage.Configurable
func (*Factory) Initialize ¶
func (f *Factory) Initialize(_ metrics.Factory, _ storage.SamplingStoreFactory, logger *zap.Logger) error
Initialize implements samplingstrategy.Factory
type Options ¶
type Options struct {
// StrategiesFile is the path for the sampling strategies file in JSON format
StrategiesFile string
// ReloadInterval is the time interval to check and reload sampling strategies file
ReloadInterval time.Duration
// DefaultSamplingProbability is the sampling probability used by the Strategy Store for static sampling
DefaultSamplingProbability float64
}
Options holds configuration for the static sampling strategy store.
Click to show internal directories.
Click to hide internal directories.