Note
Volumetric sampling is currently in public preview. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
Use volumetric sampling
The volumetric policy is a trace sampling policy for Adaptive Traces that redistributes a goal sampling target across different kinds of traces. Instead of sampling every trace at the same rate, the policy adapts its per-group sampling rate to the traffic it observes, so high-volume services don’t dominate the sample at the expense of low-volume ones.
Adaptive Traces automatically groups traces by a set of span attributes such as service.name and http.method. Each group gets its own sampling rate, which Adaptive Traces recomputes continuously so the overall sample rate converges on the percentage you configure.
The volumetric policy is a drop-in improvement over probabilistic sampling. At the same overall sample rate, you get better representation of every service and request type in your data.
Why use volumetric sampling?
Get even coverage across services and trace types
With probabilistic sampling at 10%, a noisy service that produces 90% of your traffic also produces 90% of your retained traces. Low-volume services are underrepresented, which makes them harder to investigate.
Volumetric sampling allocates the budget across groups, so each type of trace is represented more evenly in the sampled data. The policy continuously adjusts per-group rates as traffic patterns shift, so you don’t need to manually update policies as your infrastructure changes.
Lower your overall sampling rate with confidence
Because the budget is distributed more evenly, you can often reduce sampling_percentage without losing visibility into low-traffic services and routes. This reduces ingest costs while keeping coverage intact.
Upgrade from probabilistic without changing your rate
Volumetric sampling uses the same sampling_percentage field as probabilistic sampling. You can replace a probabilistic policy with a volumetric policy at the same percentage and immediately get better trace distribution.
How it works
- Adaptive Traces observes your trace data and selects a set of span attributes that produces good coverage across trace types. It reviews that selection periodically and adjusts it as your traffic changes.
- For each incoming trace, Adaptive Traces assigns the trace to a group based on those attributes.
- Each group is given its own adaptive sampling rate. The rate is recomputed approximately every 15 seconds, so it responds to shifts in traffic.
- Across all groups, the effective overall sampling rate converges on the
sampling_percentageyou configure.
Configuration
When you create a volumetric policy, the only decision you make is the target sampling rate (sampling_percentage), a number greater than 0 and at most 100. Adaptive Traces handles everything else: choosing groups, adjusting per-group rates, and keeping the overall sample rate on target.
You can set this value when you apply the recommendation, create a policy on the Policies page, or send a request to the Adaptive Traces API.
A good starting point is the same percentage you used for probabilistic sampling; lower it as you confirm that low-volume services are still well represented. You can have only one volumetric policy per tenant.
Example
If you manage policies as code, send a policy body like this to sample 10% of traces overall:
{
"type": "volumetric",
"volumetric": {
"sampling_percentage": 10
}
}Your workflow
The volumetric policy fits into your Adaptive Traces workflow as the primary mechanism for controlling overall sampling rates while maintaining fair representation across services.
Enable volumetric sampling
There are two ways to enable volumetric sampling.
- Apply the recommendation. If you currently have a single probabilistic policy, Adaptive Traces recommends upgrading it to a volumetric policy at the same
sampling_percentage. Navigate to Adaptive Traces, open the Overview page, and apply the volumetric recommendation. - Create the policy manually. If there’s no recommendation, open the Policies page, click New policy, choose Volumetric as the policy type, and set your
sampling_percentage.
To create the policy as code instead, refer to the Adaptive Traces API.
After you apply the policy, it takes effect on the next policy update cycle and starts distributing your sampling budget across groups.
Adjust your sampling strategy
With the volumetric policy in place, you can adjust your sampling approach.
- Lower
sampling_percentageto reduce ingest volume, knowing that all services remain represented. Reduce the percentage incrementally if you want to trim costs further. - Remove service-specific policies that were previously needed to guarantee minimum trace coverage for individual services. The volumetric policy handles fair distribution automatically.
The volumetric policy pairs well with other policies.
- Combine it with a diversity policy to guarantee at least one example of each unique fingerprint in addition to the volumetric baseline.
- Combine it with a drop policy to remove traces you never want to keep before the volumetric policy evaluates them.
Deactivate volumetric sampling
If you no longer want volumetric sampling, update the policy in place rather than deleting it. Deleting the policy can leave you with no active sampling for a period of time.
- Navigate to Adaptive Traces.
- Open the Policies page.
- Find the volumetric policy.
- Click the edit icon.
- Update the policy type to
probabilisticand setsampling_percentageappropriately.
No other configuration changes are required.
What to expect when using volumetric policies
| Your action | What you should expect | If this isn’t the case |
|---|---|---|
| Reduce the overall sampling percentage | Trace volume decreases proportionally, but all services and routes remain represented in the sampled output. Per-group rates adjust automatically to maintain fair distribution. | Check whether other policies (such as diversity or service-specific policies) are still capturing additional traces. The volumetric policy only controls its own sampling decisions. |
| Combine with diversity sampling | The diversity policy captures at least one trace per unique fingerprint, while the volumetric policy controls the overall sampling rate. Together, they provide both fair distribution and baseline coverage. | Verify that both policies are active. |
| Investigate a specific service | Traces from all services are available, sampled at rates proportional to their traffic volume. Low-volume services have higher effective sampling rates than they would under probabilistic sampling. | If a service is still underrepresented, consider adding a more specific policy to sample it. |
| Replace a probabilistic policy of equal rate | Overall ingest volume stays similar, but trace distribution across services and routes becomes more even. | Confirm the volumetric policy uses the same sampling_percentage as the probabilistic policy it replaced, and allow time for the per-group rates to converge. |
Note
The volumetric policy is designed to distribute the sample budget fairly, not to guarantee complete capture. It works best when paired with diversity sampling for baseline coverage of unique fingerprints.
Was this page helpful?
Related resources from Grafana Labs


