Menu
Grafana Cloud

Policy types

Here are the available policy types and their definitions. For more information on each of the policy types, refer to the Components documentation.

Policy typeDefinition
always_sampleSamples every trace that it encounters. It’s useful for debugging or when you need to capture all data.
probabilisticSamples a certain percentage of traces randomly. You can specify the sampling rate.
latencySamples traces based on their duration. You can set a threshold, and any trace that exceeds that threshold is sampled.
boolean_attributeSamples based on boolean attributes.
status_codeSamples traces based on their status code (for example, errors, success). This is very useful for capturing traces that contain errors.
string_attributeSamples traces based on the values of string attributes.
trace_stateSamples based on the values of the TraceState.
rate_limitingSamples based on the rate of spans per second.
span_countSamples based on the number of spans within a trace.
ottl_conditionSamples based on OpenTelemetry Transformation Language (OTTL) conditions. This allows very complex and specific filtering.
andAllows you to combine multiple policies using a logical “AND” operation.
compositeAllows for a combination of samplers, with ordering, and rate allocation per sampler. This creates very flexible sampling strategies.
dropAllows for a combination of specific conditions to discard unwanted traces before any other rules are evaluated.