---
type: Attested Computation
title: traffic
identifier: cloudflare/traffic
description: 'A Cloudflare zone''s traffic over the last 24 minutes, 24 hours and 24 days, drawn and diagnosed: traffic.svg stacks the three as small multiples (requests from clients by status class, the daily Worker quota and today''s projection on the days), worker.svg is the Worker''s CPU time per hour against the free plan''s 10 ms limit, and report.md is a Markdown report (a headline, the golden signals against the 24 hours before, the top talkers by kind of client and path, and diagnostics that name a poller, the side a 5xx came from, CPU headroom and the quota''s pace). Clients are counted by kind (a browser by name, else a program). Read-only; cloudflare/usage is the quota alone, as gauges. It names the top client addresses, with country and client.'
pack: cloudflare
tags:
- engineering
- internet
runtime: fragletc
image: ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522
network: required
stdin: none
execution_class: environmental
procedure_hash: sha256:21268ba90b36c46b6044760842fa5d0f78526a1ff2a1cb38e6362df600ed088d
parameters:
- name: zone
  type: string
  required: true
  description: The zone (domain) to read, e.g. example.com
- name: quota
  type: string
  required: false
  default: '100000'
  description: 'Worker requests a day the plan allows (the free plan: 100000)'
- name: tz
  type: string
  required: false
  default: UTC
  description: The IANA time zone the charts' times are shown in (the quota's day is always UTC's)
- name: top
  type: string
  required: false
  default: '5'
  description: How many top talkers and top addresses to list
computation: https://tools.ofthemachine.com/cloudflare/traffic.py
executor:
  resource: https://github.com/ofthemachine/fraglet
  receipt:
  - schema
  - fragletc
  - procedure
  - procedure_hash
  - image
  - image_digest
  - network
  - stdin_mode
  - params
  - inputs
  - argv
  - env
  - memo_key
  - started
  - finished
  - exit_code
  - stdout
  - outputs
  format: fraglet-receipt/2 (fragletc --receipt <path>, or FRAGLETC_RECEIPT_DIR)
attester:
  resource: https://tools.ofthemachine.com/receipt/attest.py
  method: 'deterministic, no re-execution: procedure_hash equals sha256 of computation; memo_key recomputes from the receipt''s own fields; claimed params and any artifact hash match the receipt'
generated:
  by: process:tools/catalog/compile.py
  at: '2026-11-13T18:27:40Z'
secrets:
- CLOUDFLARE_API_TOKEN
outputs:
- traffic.svg
- worker.svg
- report.md
---

# traffic

A Cloudflare zone's traffic over the last 24 minutes, 24 hours and 24 days, drawn and diagnosed: traffic.svg stacks the three as small multiples (requests from clients by status class, the daily Worker quota and today's projection on the days), worker.svg is the Worker's CPU time per hour against the free plan's 10 ms limit, and report.md is a Markdown report (a headline, the golden signals against the 24 hours before, the top talkers by kind of client and path, and diagnostics that name a poller, the side a 5xx came from, CPU headroom and the quota's pace). Clients are counted by kind (a browser by name, else a program). Read-only; cloudflare/usage is the quota alone, as gauges. It names the top client addresses, with country and client.

Use when someone asks what traffic a Cloudflare site or Worker is getting, for a chart of its requests over minutes, hours or days, why it returns errors, who is driving its request count, or how close it is to the daily Workers quota.

# Schema

## Parameters
- `zone` (string, required) — The zone (domain) to read, e.g. example.com
- `quota` (string, optional, default `100000`) — Worker requests a day the plan allows (the free plan: 100000)
- `tz` (string, optional, default `UTC`) — The IANA time zone the charts' times are shown in (the quota's day is always UTC's)
- `top` (string, optional, default `5`) — How many top talkers and top addresses to list
- `CLOUDFLARE_API_TOKEN` (secret, required) — read from the caller's environment, never passed with `-p`; A Cloudflare API token with Account Analytics read and Zone read (read-only)

## Outputs
- `traffic.svg` (declared file under /output)
- `worker.svg` (declared file under /output)
- `report.md` (declared file under /output)

# Execution

The computation is [`cloudflare/traffic.py`](https://tools.ofthemachine.com/cloudflare/traffic.py) (frontmatter `computation`; in `tools.tar.gz` the same file sits at `cloudflare/traffic.py` beside this bundle), run by `fragletc` in `ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522` with network `required`. Its identity is `procedure_hash` = sha256 of that file, shebang included — the same value every receipt records. Parameters are passed as `-p name=value`; `--receipt run.json` (or `FRAGLETC_RECEIPT_DIR`) writes the receipt, a `fraglet-receipt/2` JSON document with the fields listed under `executor.receipt`.

# Attestation

A run's receipt is attested with [`receipt/attest.py`](https://tools.ofthemachine.com/receipt/attest.py): the computation that ran is this script (`procedure_hash`), the receipt is internally consistent (`memo_key` recomputes from its own fields), the claimed parameters are the ones that ran, and an artifact claimed as an output hashes to what the receipt recorded. No re-execution: attestation is provenance fidelity, not reproduction.

Environmental: the tool reaches the network, so outputs depend on state outside its inputs; the receipt records exactly what ran and what came out and makes no reproduction claim.

Skill: [SKILL.md](https://tools.ofthemachine.com/cloudflare/SKILL.md)
