Documentation ¶
Overview ¶
Package jaegerremote implements the Jaeger Remote protocol.
Index ¶
- func SemVersion() stringdeprecated
- func Version() string
- type Option
- func WithInitialSampler(sampler trace.Sampler) Option
- func WithLogger(logger logr.Logger) Option
- func WithMaxOperations(maxOperations int) Option
- func WithOperationNameLateBinding(enable bool) Option
- func WithSamplingRefreshInterval(samplingRefreshInterval time.Duration) Option
- func WithSamplingServerURL(samplingServerURL string) Option
- func WithSamplingStrategyFetcher(fetcher SamplingStrategyFetcher) Option
- type Sampler
- type SamplingStrategyFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SemVersion
deprecated
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option applies configuration settings to a Sampler.
func WithInitialSampler ¶
WithInitialSampler creates a Option that sets the initial sampler to use before a remote sampler is created and used.
func WithLogger ¶ added in v0.6.0
WithLogger configures the sampler to log operation and debug information with logger.
func WithMaxOperations ¶
WithMaxOperations creates a Option that sets the maximum number of operations the sampler will keep track of.
func WithOperationNameLateBinding ¶
WithOperationNameLateBinding creates a Option that sets the respective field in the perOperationSamplerParams.
func WithSamplingRefreshInterval ¶
WithSamplingRefreshInterval creates a Option that sets how often the sampler will poll local agent for the appropriate sampling strategy.
func WithSamplingServerURL ¶
WithSamplingServerURL creates a Option that sets the sampling server url of the local agent that contains the sampling strategies.
func WithSamplingStrategyFetcher ¶ added in v0.15.0
func WithSamplingStrategyFetcher(fetcher SamplingStrategyFetcher) Option
WithSamplingStrategyFetcher creates an Option that initializes the sampling strategy fetcher. Custom fetcher can be used for setting custom headers, timeouts, etc., or getting sampling strategies from a different source, like files.
type Sampler ¶
type Sampler struct { sync.RWMutex // used to serialize access to samplerConfig.sampler // contains filtered or unexported fields }
Sampler is a delegating sampler that polls a remote server for the appropriate sampling strategy, constructs a corresponding sampler and delegates to it for sampling decisions.
func New ¶
New creates a sampler that periodically pulls the sampling strategy from an HTTP sampling server (e.g. jaeger-agent).
func (*Sampler) Close ¶
func (s *Sampler) Close()
Close does a clean shutdown of the sampler, stopping any background go-routines it may have started.
func (*Sampler) Description ¶
Description returns a human-readable name for the Sampler.
func (*Sampler) ShouldSample ¶
func (s *Sampler) ShouldSample(p trace.SamplingParameters) trace.SamplingResult
ShouldSample returns a sampling choice based on the passed sampling parameters.
func (*Sampler) UpdateSampler ¶
func (s *Sampler) UpdateSampler()
UpdateSampler forces the sampler to fetch sampling strategy from backend server. This function is called automatically on a timer, but can also be safely called manually, e.g. from tests.
type SamplingStrategyFetcher ¶ added in v0.15.0
SamplingStrategyFetcher is used to fetch sampling strategy updates from remote server.