Documentation ¶
Overview ¶
Package x contains experimental functionality with no guarantees of stable APIs.
Index ¶
- type PrioritySampler
- func (s *PrioritySampler) Close()
- func (s *PrioritySampler) OnCreateSpan(span *jaeger.Span) jaeger.SamplingDecision
- func (s *PrioritySampler) OnFinishSpan(span *jaeger.Span) jaeger.SamplingDecision
- func (s *PrioritySampler) OnSetOperationName(span *jaeger.Span, operationName string) jaeger.SamplingDecision
- func (s *PrioritySampler) OnSetTag(span *jaeger.Span, key string, value interface{}) jaeger.SamplingDecision
- type TagMatcher
- type TagMatchingSampler
- func (s *TagMatchingSampler) OnCreateSpan(span *jaeger.Span) jaeger.SamplingDecision
- func (s *TagMatchingSampler) OnFinishSpan(span *jaeger.Span) jaeger.SamplingDecision
- func (s *TagMatchingSampler) OnSetOperationName(span *jaeger.Span, operationName string) jaeger.SamplingDecision
- func (s *TagMatchingSampler) OnSetTag(span *jaeger.Span, key string, value interface{}) jaeger.SamplingDecision
- type TagMatchingSamplingStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrioritySampler ¶
type PrioritySampler struct { jaeger.SamplerV2Base // contains filtered or unexported fields }
PrioritySampler contains a list of samplers that it interrogates in order. Sampling methods return as soon as one of the samplers returns sample=true. The retryable state for each underlying sampler is stored in the extended context and once retryable=false is returned by one of the delegates it will never be called again.
func NewPrioritySampler ¶
func NewPrioritySampler(delegates ...jaeger.SamplerV2) *PrioritySampler
NewPrioritySampler creates a new PrioritySampler with given delegates.
func (*PrioritySampler) Close ¶
func (s *PrioritySampler) Close()
Close calls Close on all delegate samplers.
func (*PrioritySampler) OnCreateSpan ¶
func (s *PrioritySampler) OnCreateSpan(span *jaeger.Span) jaeger.SamplingDecision
OnCreateSpan implements SamplerV2 API.
func (*PrioritySampler) OnFinishSpan ¶
func (s *PrioritySampler) OnFinishSpan(span *jaeger.Span) jaeger.SamplingDecision
OnFinishSpan implements SamplerV2 API.
func (*PrioritySampler) OnSetOperationName ¶
func (s *PrioritySampler) OnSetOperationName(span *jaeger.Span, operationName string) jaeger.SamplingDecision
OnSetOperationName implements SamplerV2 API.
func (*PrioritySampler) OnSetTag ¶
func (s *PrioritySampler) OnSetTag(span *jaeger.Span, key string, value interface{}) jaeger.SamplingDecision
OnSetTag implements SamplerV2 API.
type TagMatcher ¶
type TagMatcher struct { TagValue interface{} `json:"value"` Firehose bool `json:"firehose"` }
TagMatcher describes which values TagMatchingSampler will match.
type TagMatchingSampler ¶
type TagMatchingSampler struct { jaeger.SamplerV2Base // contains filtered or unexported fields }
TagMatchingSampler samples traces that have spans with a particular tag value(s).
func NewTagMatchingSampler ¶
func NewTagMatchingSampler(tagKey string, matchers []TagMatcher) *TagMatchingSampler
NewTagMatchingSampler creates TagMatchingSampler with given tag key and matchers.
func NewTagMatchingSamplerFromStrategy ¶
func NewTagMatchingSamplerFromStrategy(strategy TagMatchingSamplingStrategy) *TagMatchingSampler
NewTagMatchingSamplerFromStrategy instantiates TagMatchingSampler from a strategy.
func NewTagMatchingSamplerFromStrategyJSON ¶
func NewTagMatchingSamplerFromStrategyJSON(jsonString []byte) (*TagMatchingSampler, error)
NewTagMatchingSamplerFromStrategyJSON creates the sampler from a JSON configuration of the following form:
{ "key": "tagKey", "matchers": [ { "value": "tagValue1", "firehose": true }, { "value": 42, "firehose": false } ], "values": { "tagValue1": { "firehose": true }, "tagValue2": { "firehose": false } } }
Note that matchers can be specified either via "matchers" array (preferred), or via "values" dictionary (legacy, only supports string values).
When a given tag value appears multiple time, then last one in "matchers" wins, and the one in "values" wins overall.
func (*TagMatchingSampler) OnCreateSpan ¶
func (s *TagMatchingSampler) OnCreateSpan(span *jaeger.Span) jaeger.SamplingDecision
OnCreateSpan never samples.
func (*TagMatchingSampler) OnFinishSpan ¶
func (s *TagMatchingSampler) OnFinishSpan(span *jaeger.Span) jaeger.SamplingDecision
OnFinishSpan never samples.
func (*TagMatchingSampler) OnSetOperationName ¶
func (s *TagMatchingSampler) OnSetOperationName(span *jaeger.Span, operationName string) jaeger.SamplingDecision
OnSetOperationName never samples.
func (*TagMatchingSampler) OnSetTag ¶
func (s *TagMatchingSampler) OnSetTag(span *jaeger.Span, key string, value interface{}) jaeger.SamplingDecision
OnSetTag samples if the tag matches key and one of the allowed value(s).
type TagMatchingSamplingStrategy ¶
type TagMatchingSamplingStrategy struct { Key string `json:"key"` Matchers []TagMatcher `json:"matchers"` // legacy format as map Values map[string]TagMatcher `json:"values"` }
TagMatchingSamplingStrategy defines JSON format for TagMatchingSampler strategy.