Skip to main content
By default, Atla Insights instruments and logs all traces. In high-throughput scenarios, you may want to sample traces rather than logging every execution to manage trace limits while maintaining observability.

Sampling ratio

If you want to sample a fixed ratio of traffic, we recommend using TraceRatioSampler. This is the simplest & most computationally efficient way to sample traces.

Sampling decision based on metadata:

If you want more flexibility, you can define a custom sampling decision function based on metadata.
Note that this is a more computationally intensive sampling method as we need to keep all spans in a trace alive in-memory until the entire trace ends.As metadata is mutable, we can only check the sampling decision function at the end of each trace.

Custom Sampling

Implement your own sampling logic using OpenTelemetry samplers. Here is an example:
Note that the Atla Insights platform is not intended to work well with partial traces.Therefore, we highly recommend using either ParentBased or StaticSampler samplers.This ensures either all traces are treated the same way or all spans in the same trace are treated the same way.