Context
Migration 020_p1_infra_catalog_seed (PR #4 of the infra-metrics roadmap) seeds the P1 producer-target infra metrics. One of them, infra.event.bytes, has no defensible documented per-unit cost yet.
The design doc (docs-temp/infra-metrics/design.md §2.2) carries a 1 (internal bus, finance pins) placeholder. Taken literally as 1 µ\$/byte that is ~$1.07e9/GiB; even $1/MB is ~$1.05e6/GiB — both implausible for a real messaging bus.
What was seeded
To avoid two failure modes — (a) silent floor-to-0 under the BIGINT integer unit price (rule 5), and (b) massively OVERCHARGING if an inflated placeholder is forgotten — infra.event.bytes is seeded conservatively at:
- kind:
sum
- unit:
GiB (per design §3 rule 5; producer emits value = bytes / 1024^3)
- unit_price_micros:
1 µ$/GiB (intentionally LOW floor; ≥1 so no silent-zero)
This currently UNDER-bills event bytes by ~6 orders of magnitude vs real cost.
What finance must do
Pin the real per-GiB rate before the infra.event.bytes producer goes live (PR #6, async). AWS EventBridge data-volume order of magnitude is ~$1/GB ≈ 1,000,000 µ\$/GiB; SNS ~$0.50/GB. Update the seeded row (or set the DB row directly — ON CONFLICT DO NOTHING means a finance edit survives re-init).
References
migrations/billing/020_p1_infra_catalog_seed.up.sql (the infra.event.bytes row + TODO(finance))
docs-temp/infra-metrics/design.md §2.2
Context
Migration
020_p1_infra_catalog_seed(PR #4 of the infra-metrics roadmap) seeds the P1 producer-target infra metrics. One of them,infra.event.bytes, has no defensible documented per-unit cost yet.The design doc (
docs-temp/infra-metrics/design.md§2.2) carries a1 (internal bus, finance pins)placeholder. Taken literally as1 µ\$/bytethat is~$1.07e9/GiB; even$1/MBis~$1.05e6/GiB— both implausible for a real messaging bus.What was seeded
To avoid two failure modes — (a) silent floor-to-0 under the BIGINT integer unit price (rule 5), and (b) massively OVERCHARGING if an inflated placeholder is forgotten —
infra.event.bytesis seeded conservatively at:sumGiB(per design §3 rule 5; producer emitsvalue = bytes / 1024^3)1µ$/GiB (intentionally LOW floor; ≥1 so no silent-zero)This currently UNDER-bills event bytes by ~6 orders of magnitude vs real cost.
What finance must do
Pin the real per-GiB rate before the
infra.event.bytesproducer goes live (PR #6, async). AWS EventBridge data-volume order of magnitude is ~$1/GB ≈1,000,000 µ\$/GiB; SNS ~$0.50/GB. Update the seeded row (or set the DB row directly —ON CONFLICT DO NOTHINGmeans a finance edit survives re-init).References
migrations/billing/020_p1_infra_catalog_seed.up.sql(theinfra.event.bytesrow +TODO(finance))docs-temp/infra-metrics/design.md§2.2