Enable tail sampling
You can use tail sampling to use a lower sampling percentage when necessary or desirable, such as runtime or egress traffic related costs. Probabilistic sampling strategies are easy to implement, but also run the risk of discarding relevant data that you’ll later want.
Tail sampling works with Grafana Alloy. Alloy configuration files are written in Alloy configuration syntax.
Configure tail sampling
To start using tail sampling, define a sampling policy in your configuration file.
If you’re using a multi-instance deployment of Alloy, add load balancing and specify the resolving mechanism to find other Alloy instances in the setup.
To see all the available configuration options for load balancing, refer to the Alloy component reference.
Example for Alloy
Alloy uses the otelcol.processor.tail_sampling component
for tail sampling.