The sampling controls provide you with full control over the rate at which traces are accepted or into the Raygun APM product. Sampling can be defined as a single rate applied to all traces or a rate per URL for a web application.
Raygun Agent-level sampling controls
All trace sampling settings are now controlled in-app. Any changes made to the sampling settings in the app are retrieved by all agents registered to that application and are applied within 10 minutes of making the sampling changes.
You can view trace sampling settings using the Raygun Profiler Configuration tool. To view the sampling settings for an application, open the Raygun Profiler Configuration tool then select the application that has been enabled.
In-app sampling controls
To view and edit trace sampling settings navigate to your Raygun application, select APM from the menu and then Sampling.
The sampling default options allow you to edit the trace sampling settings for the application. These settings are applied to all traces for the application, for each agent registered against the application.
Sampling can be specified as:
- Per trace - a single rate is applied over all traces
- Per URL - a rate defined in seconds, minutes or hours per URL and request verb (GET, PUT, POST, etc)
Sampling Overrides for Web Requests
For traces of web requests sampling overrides can only be defined per URL, allowing you to override (increase or decrease) the sample rate of a given URL.
For example you may have a specific website page you know is causing performance issues and you want to capture more traces of requests to this page. This setting allows you to increase the sampling rate of this page.
To define an override, enter the URL you want to override and the sampling rate. Click Add override to apply the settings.
Sampling Overrides for Other Traces
Not all of the traces will have a URL on them, for example, scheduled background activities. In this case, traces will be named by their entry point method - the first method in the trace.
To define an override:
- Copy the trace name from the Traces tab and paste it into the Name field.
- Choose the desired sampling rate.
- Click Add override to apply the settings.
- This override type is only supported by APM Agent version 1.0.1172 or higher. Older agents will ignore these settings.
- This override is supported when profiling .NET / .NET Core code only. The support for other languages will be added later.
The list of active overrides allows you to see the list of current overrides. It also allows you to disable an override temporarily and delete overrides no longer needed.
To disable or enable an override simple click the slider control. To delete an override click on the X icon. Note that changes to this list are applied immediately.