The “Probabilistic Sampler” Odigos Action supports probabilistic sampling based on a configured sampling percentage applied to the TraceID.

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.

Stability

  • Performance Trend Analysis - In certain scenarios, users may seek to collect sufficient data to understand performance trends without overwhelming the system with excessive telemetry data. For example, track latency trend.
  • Telemetry Volume Management - When experiencing a sudden influx of telemetry data, probabilistic sampling can temporarily reduce data volume sent to your data destination.

Mechanism

This action receives a sampling percentage as a float to configure the sampler.

Basic Example

The basic example below shows how to add a sampler with

Create a file named probabilistic-sampler.yaml with the following content:

apiVersion: actions.odigos.io/v1alpha1
kind: ProbabilisticSampler
metadata:
  name: example-probabilistic-sampler
  namespace: odigos-system
spec:
  actionName: "configure probabilistic_sampler"
  sampling_percentage: "15"
  signals:
    - TRACES

Apply the action to the cluster:

kubectl apply -f probabilistic-sampler.yaml

Full Action Options

The full list of options available for the “ProbabilisticSampler” action are:

  • sampling_percentage (required): Percentage at which items are sampled; = 100 samples all items, 0 rejects all items.

  • signals (required): An array with the signals that the processor will act on (TRACES).

  • actionName (optional): Allows you to attach a meaningful name to the action for convenience. Odigos does not use or assume any meaning from this field.

  • notes (optional): A free-form text field that allows you to attach notes to the action for convenience. Odigos does not use or assume any meaning from this field.

  • disabled (optional): A boolean field that allows you to disable the action. When set to true, the action will not be executed. The default value is false.

Notes

  • Currently supports only traces.
  • The action will arbitrarily filter out traces regardless of their properties, potentially dropping important traces, even if they were sampled by other samplers.
  • All spans in a trace will be either entirely dropped or entirely sampled.
  • The action will be positioned after all other sampling actions,