Reliability and controls
Replaying Metered Events: Deterministic Results Require Versioned Rules
By the Orvlin team · · 1 min read
Deterministic billing replay: what to decide
Engineering replays last month’s data with today’s catalog and calls the new amount a correction. But a legitimate price change may explain the difference. Reproducibility requires preserving the rules used at the time.
Version meter definitions, aggregation and pricing independently where they can change. Record which version applies to each period or action. A replay for investigation should be isolated from financial side effects until its purpose is reviewed.
A concrete scenario
A meter originally counted successful exports and later changed to count all attempts. Replaying October with November’s definition changes the quantity even if every raw record is identical.
A detail teams often miss
Determinism also depends on external lookups. If account mapping or exchange rates are fetched live during replay, the output may drift. Preserve the relevant decision inputs or stable references.
Before you put this into production
- Preserve original event identities and dates.
- Version mapping and rating inputs.
- Separate investigative replay from collection.
- Compare outputs and explain every intended difference.
Frequently asked questions
- Does retaining raw events guarantee reproducibility?
- No. The rules, mappings and other decision inputs used to interpret those events must also be preserved.