Cloudflare Docs
Logs
Visit Logs on GitHub
Set theme to dark (⇧+D)

❮ Back to FAQ

Common calculations

​​ How can I calculate bytes served by the origin from Cloudflare Logs?

The best way to calculate bytes served by the origin is to use the CacheResponseBytes field in Cloudflare Logs, and to filter only requests that come from the origin. Make sure to filter out OriginResponseStatus values 0 and 304, which indicate a revalidated response.

​​ How do I calculate bandwidth usage for my zone?

Bandwidth (or data transfer) can be calculated by adding the EdgeResponseBytes field in HTTP request logs. There are some types of requests that are not factored into bandwidth calculations. In order to only include relevant requests in calculations, add the filter ClientRequestSource = 'eyeball'.