Documentation ¶
Overview ¶
Package tail_sampling provides an otelcol.processor.tail_sampling component.
Index ¶
- Variables
- type AndConfig
- type AndSubPolicyConfig
- type Arguments
- func (args Arguments) Convert() (otelcomponent.Config, error)
- func (args Arguments) Exporters() map[otelcomponent.DataType]map[otelcomponent.ID]otelcomponent.Component
- func (args Arguments) Extensions() map[otelcomponent.ID]otelextension.Extension
- func (args Arguments) NextConsumers() *otelcol.ConsumerArguments
- func (args *Arguments) SetToDefault()
- func (args *Arguments) Validate() error
- type BooleanAttributeConfig
- type CompositeConfig
- type CompositeSubPolicyConfig
- type ErrorMode
- type LatencyConfig
- type NumericAttributeConfig
- type OttlConditionConfig
- type PolicyConfig
- type ProbabilisticConfig
- type RateAllocationConfig
- type RateLimitingConfig
- type SharedPolicyConfig
- type SpanCountConfig
- type StatusCodeConfig
- type StringAttributeConfig
- type TraceStateConfig
Constants ¶
This section is empty.
Variables ¶
var DefaultArguments = Arguments{ DecisionWait: 30 * time.Second, NumTraces: 50000, ExpectedNewTracesPerSec: 0, }
DefaultArguments holds default settings for Arguments.
Functions ¶
This section is empty.
Types ¶
type AndConfig ¶ added in v0.35.0
type AndConfig struct {
SubPolicyConfig []AndSubPolicyConfig `river:"and_sub_policy,block"`
}
type AndSubPolicyConfig ¶ added in v0.35.0
type AndSubPolicyConfig struct {
}AndSubPolicyConfig holds the common configuration to all policies under and policy.
func (AndSubPolicyConfig) Convert ¶ added in v0.35.0
func (andSubPolicyConfig AndSubPolicyConfig) Convert() tsp.AndSubPolicyCfg
type Arguments ¶
type Arguments struct { PolicyCfgs []PolicyConfig `river:"policy,block"` DecisionWait time.Duration `river:"decision_wait,attr,optional"` NumTraces uint64 `river:"num_traces,attr,optional"` ExpectedNewTracesPerSec uint64 `river:"expected_new_traces_per_sec,attr,optional"` // Output configures where to send processed data. Required. Output *otelcol.ConsumerArguments `river:"output,block"` }
Arguments configures the otelcol.processor.tail_sampling component.
func (Arguments) Convert ¶
func (args Arguments) Convert() (otelcomponent.Config, error)
Convert implements processor.Arguments.
func (Arguments) Exporters ¶
func (args Arguments) Exporters() map[otelcomponent.DataType]map[otelcomponent.ID]otelcomponent.Component
Exporters implements processor.Arguments.
func (Arguments) Extensions ¶
func (args Arguments) Extensions() map[otelcomponent.ID]otelextension.Extension
Extensions implements processor.Arguments.
func (Arguments) NextConsumers ¶
func (args Arguments) NextConsumers() *otelcol.ConsumerArguments
NextConsumers implements processor.Arguments.
func (*Arguments) SetToDefault ¶ added in v0.35.0
func (args *Arguments) SetToDefault()
SetToDefault implements river.Defaulter.
type BooleanAttributeConfig ¶ added in v0.35.0
type BooleanAttributeConfig struct { // Tag that the filter is going to be matching against. Key string `river:"key,attr"` // Value indicate the bool value, either true or false to use when matching against attribute values. // BooleanAttribute Policy will apply exact value match on Value Value bool `river:"value,attr"` }
BooleanAttributeConfig holds the configurable settings to create a boolean attribute filter sampling policy evaluator.
func (BooleanAttributeConfig) Convert ¶ added in v0.35.0
func (booleanAttributeConfig BooleanAttributeConfig) Convert() tsp.BooleanAttributeCfg
type CompositeConfig ¶ added in v0.35.0
type CompositeConfig struct { MaxTotalSpansPerSecond int64 `river:"max_total_spans_per_second,attr"` PolicyOrder []string `river:"policy_order,attr"` SubPolicyCfg []CompositeSubPolicyConfig `river:"composite_sub_policy,block,optional"` RateAllocation []RateAllocationConfig `river:"rate_allocation,block,optional"` }
CompositeConfig holds the configurable settings to create a composite sampling policy evaluator.
func (CompositeConfig) Convert ¶ added in v0.35.0
func (compositeConfig CompositeConfig) Convert() tsp.CompositeCfg
type CompositeSubPolicyConfig ¶ added in v0.35.0
type CompositeSubPolicyConfig struct { // Configs for and policy evaluator. AndConfig AndConfig `river:"and,block,optional"` }
CompositeSubPolicyConfig holds the common configuration to all policies under composite policy.
func (CompositeSubPolicyConfig) Convert ¶ added in v0.35.0
func (compositeSubPolicyConfig CompositeSubPolicyConfig) Convert() tsp.CompositeSubPolicyCfg
type ErrorMode ¶ added in v0.35.0
type ErrorMode string
The error mode determines whether to ignore or propagate errors with evaluating OTTL conditions.
func (*ErrorMode) UnmarshalText ¶ added in v0.35.0
type LatencyConfig ¶ added in v0.35.0
type LatencyConfig struct { // ThresholdMs in milliseconds. ThresholdMs int64 `river:"threshold_ms,attr"` }
LatencyConfig holds the configurable settings to create a latency filter sampling policy evaluator
func (LatencyConfig) Convert ¶ added in v0.35.0
func (latencyConfig LatencyConfig) Convert() tsp.LatencyCfg
type NumericAttributeConfig ¶ added in v0.35.0
type NumericAttributeConfig struct { // Tag that the filter is going to be matching against. Key string `river:"key,attr"` // MinValue is the minimum value of the attribute to be considered a match. MinValue int64 `river:"min_value,attr"` // MaxValue is the maximum value of the attribute to be considered a match. MaxValue int64 `river:"max_value,attr"` }
NumericAttributeConfig holds the configurable settings to create a numeric attribute filter sampling policy evaluator.
func (NumericAttributeConfig) Convert ¶ added in v0.35.0
func (numericAttributeConfig NumericAttributeConfig) Convert() tsp.NumericAttributeCfg
type OttlConditionConfig ¶ added in v0.35.0
type OttlConditionConfig struct { ErrorMode ErrorMode `river:"error_mode,attr"` SpanConditions []string `river:"span,attr,optional"` SpanEventConditions []string `river:"spanevent,attr,optional"` }
OttlConditionConfig holds the configurable setting to create a OTTL condition filter sampling policy evaluator.
func (OttlConditionConfig) Convert ¶ added in v0.35.0
func (ottlConditionConfig OttlConditionConfig) Convert() tsp.OTTLConditionCfg
type PolicyConfig ¶ added in v0.35.0
type PolicyConfig struct { // Configs for defining composite policy CompositeConfig CompositeConfig `river:"composite,block,optional"` // Configs for defining and policy AndConfig AndConfig `river:"and,block,optional"` }
func (PolicyConfig) Convert ¶ added in v0.35.0
func (policyConfig PolicyConfig) Convert() tsp.PolicyCfg
type ProbabilisticConfig ¶ added in v0.35.0
type ProbabilisticConfig struct { // HashSalt allows one to configure the hashing salts. This is important in scenarios where multiple layers of collectors // have different sampling rates: if they use the same salt all passing one layer may pass the other even if they have // different sampling rates, configuring different salts avoids that. HashSalt string `river:"hash_salt,attr,optional"` // SamplingPercentage is the percentage rate at which traces are going to be sampled. Defaults to zero, i.e.: no sample. // Values greater or equal 100 are treated as "sample all traces". SamplingPercentage float64 `river:"sampling_percentage,attr"` }
ProbabilisticConfig holds the configurable settings to create a probabilistic sampling policy evaluator.
func (ProbabilisticConfig) Convert ¶ added in v0.35.0
func (probabilisticConfig ProbabilisticConfig) Convert() tsp.ProbabilisticCfg
type RateAllocationConfig ¶ added in v0.35.0
type RateAllocationConfig struct { Policy string `river:"policy,attr"` Percent int64 `river:"percent,attr"` }
RateAllocationConfig used within composite policy
func (RateAllocationConfig) Convert ¶ added in v0.35.0
func (rateAllocationConfig RateAllocationConfig) Convert() tsp.RateAllocationCfg
type RateLimitingConfig ¶ added in v0.35.0
type RateLimitingConfig struct { // SpansPerSecond sets the limit on the maximum nuber of spans that can be processed each second. SpansPerSecond int64 `river:"spans_per_second,attr"` }
RateLimitingConfig holds the configurable settings to create a rate limiting sampling policy evaluator.
func (RateLimitingConfig) Convert ¶ added in v0.35.0
func (rateLimitingConfig RateLimitingConfig) Convert() tsp.RateLimitingCfg
type SharedPolicyConfig ¶ added in v0.35.0
type SharedPolicyConfig struct {}
This cannot currently have a Convert() because tsp.sharedPolicyCfg isn't public
type SpanCountConfig ¶ added in v0.35.0
type SpanCountConfig struct { // Minimum number of spans in a Trace MinSpans int32 `river:"min_spans,attr"` }
SpanCountConfig holds the configurable settings to create a Span Count filter sampling policy sampling policy evaluator
func (SpanCountConfig) Convert ¶ added in v0.35.0
func (spanCountConfig SpanCountConfig) Convert() tsp.SpanCountCfg
type StatusCodeConfig ¶ added in v0.35.0
type StatusCodeConfig struct {
StatusCodes []string `river:"status_codes,attr"`
}
StatusCodeConfig holds the configurable settings to create a status code filter sampling policy evaluator.
func (StatusCodeConfig) Convert ¶ added in v0.35.0
func (statusCodeConfig StatusCodeConfig) Convert() tsp.StatusCodeCfg
type StringAttributeConfig ¶ added in v0.35.0
type StringAttributeConfig struct { // Tag that the filter is going to be matching against. Key string `river:"key,attr"` // Values indicate the set of values or regular expressions to use when matching against attribute values. // StringAttribute Policy will apply exact value match on Values unless EnabledRegexMatching is true. Values []string `river:"values,attr"` // EnabledRegexMatching determines whether match attribute values by regexp string. EnabledRegexMatching bool `river:"enabled_regex_matching,attr,optional"` // CacheMaxSize is the maximum number of attribute entries of LRU Cache that stores the matched result // from the regular expressions defined in Values. // CacheMaxSize will not be used if EnabledRegexMatching is set to false. CacheMaxSize int `river:"cache_max_size,attr,optional"` // InvertMatch indicates that values or regular expressions must not match against attribute values. // If InvertMatch is true and Values is equal to 'acme', all other values will be sampled except 'acme'. // Also, if the specified Key does not match on any resource or span attributes, data will be sampled. InvertMatch bool `river:"invert_match,attr,optional"` }
StringAttributeConfig holds the configurable settings to create a string attribute filter sampling policy evaluator.
func (StringAttributeConfig) Convert ¶ added in v0.35.0
func (stringAttributeConfig StringAttributeConfig) Convert() tsp.StringAttributeCfg
type TraceStateConfig ¶ added in v0.35.0
type TraceStateConfig struct { // Tag that the filter is going to be matching against. Key string `river:"key,attr"` // Values indicate the set of values to use when matching against trace_state values. Values []string `river:"values,attr"` }
func (TraceStateConfig) Convert ¶ added in v0.35.0
func (traceStateConfig TraceStateConfig) Convert() tsp.TraceStateCfg