Sometimes you may want to limit the amount of analytics data coming into your API management tool. This could be because you want to exclude specific traffic, such as internal or health check traffic, or you may want to reduce unnecessary data to control cost. Dynamic sampling does just this. Dynamic sampling lets you control which API calls are logged to your API management tool based on customer or API behavior. Intelligently extrapolate metrics for accurate reporting even with multiple sample rates so that no matter what rules or sample rates you have set up, you can be sure you are still seeing an accurate representation of your data.
Dynamic sampling is controlled by setting up sampling rules in the API management tool’s dashboard. You can create rules based on criteria such as request path, response status codes, user or company behaviors, and more. You can also control the applied sample rate for each rule. The sample rate is the percentage of events that will make their way into your API management tool. For example, if you set a rule to sample 50% of events, your management tool will log half of the matching events intelligently (and not just log every other event to meet the 50% sampling rate).