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.

System Optimization

  • 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

Basic Example

The following example demonstrates how to add a sampler that retains 100% of error traces and 50% of non-error traces.

1

Create a YAML file with the following content:

error-sampler.yaml
apiVersion: actions.odigos.io/v1alpha1
kind: ErrorSampler
metadata:
  name: example-error-sampler
  namespace: odigos-system
spec:
  actionName: "configure-error-sampler"
  fallback_sampling_ratio: 50
  signals:
    - TRACES

Apply the action to the cluster:

kubectl apply -f error-sampler.yaml
2

Apply the action to the cluster:

kubectl apply -f error-sampler.yaml