This feature is in beta. It may be subject to changes and improvements based on user feedback.
Considerations
Before enabling probabilistic sampler, please note the following:
- Supports only traces.
- All spans in a trace will be either entirely dropped or entirely sampled.
- This action is a
global
action, meaning it applies to all traces in the system without filtering for specific services or endpoints. - Adding this action causes a 30-second delay in sending the data.
- Traces with durations exceeding 30 seconds might not be sampled correctly.
Use Cases
Cost Reduction- Some vendors charge based on the amount of data ingested. For self hosted destinations, the cost is correlated to the use of cloud resources which grows with the based on the amount of data you process and store. By Reducing traces volumes, you can reduce the amount of data ingested and reduce costs.
- Error traces are typically more informative for identifying and resolving issues. By focusing only on error traces, developers can quickly pinpoint and address problems, optimizing system performance and reducing the time and resources spent on debugging non-critical traces.
Configuration Options
The ErrorSampler action is configured using theodigos.io/v1alpha1.Action
CRD with the samplers
configuration section.
actionName
actionName
actionName
string
: Allows you to attach a meaningful name to the action for convenience.- This field is optional
- Odigos does not use or assume any meaning from this field
notes
notes
notes
string
: Allows you to attach notes regarding the action for convenience.- This field is optional
- Odigos does not use or assume any meaning from this field
disabled
disabled
disabled
boolean
: Allows you to temporarily disable the action, but keep it saved for future use.- This field is optional, and defaults to
false
signals *
signals *
signals
string[]
: An array with the signals that the action will operate on.- This field is required
- Supported values:
TRACES
samplers *
samplers *
samplers
object
: Configuration for sampling actions.- This field is required for this action type
errorSampler *
errorSampler *
errorSampler
object
: Configuration for the ErrorSampler.- This field is required for this action type
fallback_sampling_ratio *
fallback_sampling_ratio *
fallback_sampling_ratio
number
: Specifies the ratio of non-error traces you still want to retain.- This field is required
- For example: setting it to 50 ensures that 50% of the non-error traces will be retained.
Basic Example
The following example demonstrates how to add a sampler that retains 100% of error traces and 50% of non-error traces using the new Action CRD.1
Create a YAML file with the following content:
error-sampler.yaml
2
Apply the action to the cluster: