Skip to content
MDView as Markdown

Sampling

What is Sampling?

Sampling allows you to control what percentage of incoming reports are accepted and stored for each report type. Rather than collecting every single report — which can be very high volume for busy sites — you can instruct Report URI to keep only a fraction of them.

Reports that are discarded by sampling appear as Sampled in your Usage Metrics and count differently towards your monthly quota.

Default Sample Rates

Most report types default to 100% sampling, meaning every report is accepted. Two report types are natively downsampled by default:

Report Type Default Rate Reason
CSP Wizard 1% The Wizard is used for initial policy discovery and generates high volumes
CSP Integrity 10% Integrity checks produce frequent reports and a sample is sufficient
All others 100% All reports accepted by default

Configuring Sampling

You can adjust the sampling rate for each report type in the Filters section of your account. Click the Configure button in the Report Sampling Rates panel to open the configuration modal.

Each report type has a slider and a numeric input that accepts values between 1% and 100%:

  • 100% — all reports are accepted (sampling disabled)
  • 50% — approximately half of reports are accepted at random
  • 1% — only 1 in every 100 reports is accepted

Sampling is applied randomly on a per-report basis. When a report arrives, a random number is compared against your configured rate — if the report falls outside the percentage you have set, it is discarded and recorded as Sampled.

Quota Impact

Sampled reports are treated differently to other discarded reports:

  • Only 10% of reports discarded by sampling count against your monthly quota

This means you can significantly reduce your stored report volume using sampling while also reducing your quota consumption. This makes sampling particularly useful for high-volume report types where you only need a representative sample rather than every individual report.

Viewing Sampled Reports

You can see how many reports are being sampled in the Usage Metrics table on your account dashboard. The Sampled column shows the number of reports discarded by sampling for each report type, alongside your Accepted, Filtered and Rejected counts.

Worked Example

The table below shows how the sample rate affects quota consumption for a report type sending 1,000,000 reports in a month. Accepted reports count in full, and the reports discarded by sampling count at 10%:

Sample Rate Accepted Sampled Quota Consumed
100% 1,000,000 0 1,000,000
50% 500,000 500,000 550,000
10% 100,000 900,000 190,000
1% 10,000 990,000 109,000

Reading the 10% row: 100,000 reports are accepted and count in full, and the 900,000 discarded by sampling add a further 90,000, for 190,000 in total. You store a tenth of the reports and consume a little under a fifth of the quota.

Because sampling is applied randomly per report, real figures will vary slightly around these numbers.