URL-based sampling
OneAgent version 1.281+
To modify a specific trace contribution to the environment trace volume, you can customize the capturing frequency of specific URLs to your needs.
- Go to Settings > Server-side service monitoring > URL-based sampling.
- Select Add URL.
- Create your new rule.
-
Modify OneAgent capturing frequency as needed.
- To increase or reduce the frequency of trace capture for a URL once the peak trace volume is exceeded, set Importance of a specific URL to a different scaling factor.
- To never capture traces for a URL, regardless of the available trace volume, turn on Ignore URLs with specific path and/or query parameters.
-
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.
- Type a query parameter name.
- Type the query parameter value or turn on Query parameter value is undefined.
-
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.
-
- Select Save changes.
Process and process group override
To override URL-based sampling environment settings for a specific process group or process
- On the process group level, select More (…) > Process group settings and select URL-based sampling.
- On the process level, select More (…) > OneAgent feature settings and select URL-based sampling.
Use case examples
The following rule reduces by 4 the capturing frequency of requests that start with _healthz
.
- Go to Settings > Server-side service monitoring > URL-based sampling.
- Select Add URL.
- From Importance of a specific URL, select Reduce capturing by factor 2.
- Type the URL path
/_healthz
. - From Path comparison condition, select Starts with.
- Turn on Any HTTP method.
- Select Save changes.
The following rule ignores all requests (starts with /
) that have OPTIONS
as HTTP method for a selected process group.
- Go to the process group and select More (…) > Process group settings > URL-based sampling.
- Select Add URL.
- Turn on Ignore a specific URL.
- Type the URL path
/
. - From Path comparison condition, select Starts with.
- Turn off Any HTTP method.
- From the HTTP method list, turn on OPTIONS.
- Select Save changes.
- optional Create a new rule for each process group that you want to target.