Skip to content
46 linesCodeBlameRaw
1-- Observability ingest (services/telemetry): every workspace sends 1 GiB a
2-- month free across all its projects; past it, a workspace on the plan is
3-- charged by the GB of everything its projects send, at cost plus 20%
4-- like everything else. The telemetry service reports the month so far
5-- (note_pending, source `telemetry`) with what it cost at this meter.
6--
7-- What a GB costs g1t, from how the telemetry service keeps it and
8-- Cloudflare's published Workers Paid prices:
9--
10-- * Rows written ($1.00 a million, SQLite-backed Durable Objects). Every
11-- item sent (log line, span, request, metric point) is one row in the
12-- project's store, plus its indexes (each counts as a written row): a log
13-- is its row, three indexes and its full-text entry (~5); a span its row
14-- and one index (~2); a request two halves merged and then rolled up
15-- (~8); a metric point its row, two indexes and its name (~4). The same
16-- rows are written again when retention deletes them. About 8 rows
17-- written an item, at an assumed 1 KB an item as received (OTLP JSON
18-- spans and logs with their attributes; tail rows as kept): 1 million
19-- items, 8 million rows, $8.00 a GB.
20-- * Storage ($0.20 a GB-month). Kept with indexes and full text at about
21-- twice what arrived, for at most 30 days of retention: up to 2
22-- GB-months, $0.40 a GB.
23-- * Requests and CPU of the Worker and the store (OTLP in batches of
24-- about 1 MB): under $0.10 a GB.
25--
26-- About $8.50 a GB, sold at $10.20. The assumption that moves it is the
27-- size of an item: at 500 bytes it would cost about $17, at 2 KB about
28-- $4.25. The price keeper and the margin report correct it from what
29-- Cloudflare bills, like every other meter.
30INSERT INTO prices (meter, title, unit, cost_micros, markup_percent, source, updated_at) VALUES
31 ('telemetry_gb', 'Observability: data sent past the free 1 GiB a month', 'GB', 8500000, 20, 'list', '2026-10-13T00:00:00Z')
32ON CONFLICT (meter) DO NOTHING;
33
34INSERT INTO price_changes (id, meter, old_cost_micros, new_cost_micros, markup_percent, reason, created_at) VALUES
35 ('prc_new_telemetry_gb', 'telemetry_gb', 8500000, 8500000, 20, 'Now metered: observability data a workspace on the plan sends past the free 1 GiB a month, at what keeping it in Durable Objects costs', '2026-10-13T00:00:00Z')
36ON CONFLICT (id) DO NOTHING;
37
38INSERT OR IGNORE INTO price_versions (id, meter, version, cost_micros, markup_percent, effective_at, reason, created_by, created_at, applied_at) VALUES
39 ('pv_telemetry_gb_1', 'telemetry_gb', 1, 8500000, 20, '2026-10-13T00:00:00Z', 'Observability ingest', 'migration', '2026-10-13T00:00:00Z', '2026-10-13T00:00:00Z');
40
41-- Its revenue in sudo's margin, under its own product. Package storage,
42-- charged at month end alongside it, gets its own too: unmapped, either
43-- would count as models.
44INSERT OR IGNORE INTO revenue_map (key, bucket, updated_at, updated_by) VALUES
45 ('telemetry', 'observability', '2026-10-13T00:00:00Z', 'migration'),
46 ('package_storage', 'packages', '2026-10-13T00:00:00Z', 'migration');