![]() |
VOOZH | about |
Datadog adaptive sampling helps you capture more relevant traces while remaining close to a specific budget (ingested gigabytes).
When you choose adaptive sampling as your sampling strategy, you select a target monthly volume for trace ingestion for one or more services. This ensures that the consumption of these services matches the target volume at the end of the month, while keeping visibility over their endpoints.
Adaptive sampling uses remote configuration plus the existing sampling rules mechanisms to dynamically adjust sampling rates for each environment, service, and resource combination. This helps you to:
To configure services to use adaptive sampling, follow the instructions listed below.
APM Remote Configuration Write permission.The following table lists minimum SDK versions required for adaptive sampling:
| Language | Minimum version required |
|---|---|
| Java | v1.34.0 |
| Go | v1.68.0 |
| Python | v2.9.6 |
| Ruby | v2.0.0 |
| Node.js | v5.16.0 |
| .NET | v2.54.0 |
| C++/Proxies | v0.2.2 |
| PHP | v1.4.0 |
| Rust | v0.4.0 |
Limits apply to service and environment combinations depending on the sampling configuration:
service/env combinations onboarded to adaptive sampling is 800.service/env pair configured for adaptive sampling counts toward this limit.service/env combinations using remote sampling configuration is 1000.service/env pair with remote sampling enabled counts once toward this limit.service/env combination uses both adaptive sampling and remote sampling configuration, it counts once toward each respective limit (once toward the 800 adaptive sampling limit and once toward the 1000 remote sampling limit).To get started with adaptive sampling, you first need to pick a target strategy setting:
| Budget by Number of APM Hosts | Budget by Data Volume | |
|---|---|---|
| Pros | Scales with the number of APM hosts and the number of services onboarded; you only have to set it once | Ensures you never go over budget |
| Cons | Not a good fit if you want to stay below a specific volume, as it may vary depending on the number of hosts reporting APM data to Datadog | You have to edit the budget every time you onboard a new service to adaptive sampling |
To set the adaptive sampling monthly target:
Set your monthly target to a percentage of your allotment. At the bottom of the page, you are provided with a more complete explanation of how that percentage is converted in a monthly target volume. It is the product of:
150GB * number_of_APM_hosts + 50GB * number_of_traced_serverless_invocations (if applicable) + 10GB * number_of_fargate_tasks (if applicable)That monthly target volume is recomputed every 30 minutes.
If you are configuring the first service to adaptive sampling, ensure that the ingestion volume target is >0. For subsequent services, you should increase the allocated budget after the new service is onboarded to account for the new volume.
Before you configure adaptive sampling for a service, you can view the current ingestion configuration for the service.
To see configured sampling rates:
The table includes:
AUTOMATIC: Default head-based sampling mechanism from the Agent.CONFIGURED LOCAL: Sampling rule set locally in the SDK.CONFIGURED REMOTE: Remote sampling rule set from the Datadog UI.ADAPTIVE REMOTE: Adaptive sampling rules set by Datadog.Once a service is onboarded to adaptive sampling, the sampling rates are adjusted and recomputed every 10 minutes.
To onboard a service to adaptive sampling:
GET /checkout endpoints) or less (for example, 0.1% of /health requests) data.The configuration should take effect in 5-6 minutes, the time it takes for Datadog to observe the service’s traffic pattern, compute, then apply the sampling rates. Resources that have been configured remotely display as Configured Remote in the Configuration column.
By default, only users with the Datadog Admin role can modify adaptive sampling configurations or onboard services to adaptive sampling.
If your organization uses custom roles, assign your user to a custom role that includes APM Remote Configuration Write and APM Service Ingest Write permissions.
Use granular access controls to manage who can modify a service’s adaptive sampling configuration. You can restrict access based on roles, teams, or individual users.
To restrict access:
Note: Only users with the remote_config_write permission can restrict access to the adaptive sampling configuration of individual services.
Open the Permissions section in the Ingestion Control side panel of the service.
Click Restrict access.
Select the teams, roles, or users to grant access to.
Click Add.
Additional helpful documentation, links, and articles:
| |