Resource-based sampling

Overview

Remote configuration allows you to dynamically set ingestion sampling rates by service and resource name, from the Datadog UI, without having to redeploy your service.

Requirements

  • Datadog Agent 7.41.1 or higher.
  • Remote Configuration enabled for your Agent.
  • APM Remote Configuration Write permissions. If you don’t have these permissions, ask your Datadog admin to update your permissions from your organization settings.

Tracing library version

Find below the minimum tracing library version required for the feature:

LanguageMinimum version required
Javav1.34.0
Gov1.64.0
Pythonv.2.9.0
Rubyv2.0.0
Node.jsv5.16.0
PHPv1.4.0
.NETv.2.53.2
C++v0.2.2

See sampling rates by resource in the Ingestion Control page

To see configured sampling rates by resource, navigate to the Ingestion controls Service Ingestion summary. The table lists the applied sampling rate by resource of the service.

Sampling rates table by resource
  • The Ingested bytes column surfaces the ingested bytes from spans of the service and resource, while the Downstream bytes column surfaces the ingested bytes from spans where the sampling decision is made starting from that service and resource, including bytes from downstream services in the call chain.
  • The Configuration column surfaces where the resource sampling rate is being applied from:

Remotely configure sampling rules for the service

To configure sampling rates for the service by resource name:

  1. Click Manage Ingestion rate. If the remote configuration option is disabled, make sure that the listed requirements are all met.
    Configuration Modal
  2. Click Add new rule to set sampling rates for some resources. Sampling rules use glob pattern matching, so you can use wildcards (*) to match against multiple resources at the same time.
  3. Click Apply to save the configuration.

The configuration should take effect in less than a minute. You can observe the configuration changes from the Live Search Explorer.

From the Service Ingestion Summary, resources for which the sampling rate are remotely applied should show as Remote Configured in the Configuration column.

Further reading

Additional helpful documentation, links, and articles: