Adaptive Traffic Management automatically starts sampling traces if the amount of ingested traces exceeds the included trace volume. In case of Extended trace ingest the threshold is increased but otherwise it works the same way. If OneAgent capture rate is below 100%, sampling has been applied because the amount of traces that can be captured by OneAgent has exceeded the Full-Stack included trace volume.
If the capture rate is not 100% you can tell the OneAgent to increase or decrease the sampling frequency of certain requests. This does not change the overall ingested trace volume, nor will it change the overall capture rate. It does enable you to control what the available trace volume is used.
You have two options:
Modify OneAgent capturing frequency as needed.
Type the URL path or specify query parameters.
Use wildcards (**
) for URLs with similar segment paths, such as URLs of the same domain.
For example, in /api/product/**/detail
, all values between slashes are ignored; the path applies to both /api/product/1/detail
and /api/product/2/detail
.
To specify query parameters, go to Query parameters and select Add item.
optional To apply the scaling factor to one or more HTTP methods, turn off Any HTTP method and select the HTTP method(s) to target.
Dynatrace version 1.312+
Very often you do not have the permission to configure sampling for the environment. However your Dynatrace admin can give you permissions to set up configuration on a host group level. Dynatrace recommends to do that. In this case you can then set up sampling rules on host group.
To do this go to the Host classic app, filter by the host group of choice. Click on any host in that host group, select More (…) > ** Host group settings ** and select URL-based sampling.
Very often you either do not have the permission to configure sampling for the environment, or you simply only want this to effect a particular process group. To do this go to either the Process in Host classic or Process group in Technologies & Processes Classic. Find your Process or Process group.
You can configure trace sampling for all traces started by a particular Kubernetes cluster or namespace. This is useful if you do not have environment permissions or simply want this to only effect a particular part of your environment. To do this
The following rule reduces by 4 the capturing frequency of requests that start with _healthz
.
/_healthz
.The following rule ignores all requests (starts with /
) that have OPTIONS
as HTTP method for a selected process group.
/
.