Development¶
Adding a command¶
- Add an input +
*Validatorin.DomainModel/.DomainModel.Impl. - Add the method to
IUsageMetersProcessor/DefaultUsageMetersProcessor; mutate theUsageMeteraggregate and emit the appropriatemetering.*event. - Expose over both adapters (
IUsageMeterManagementService-> REST +Grpc*). - Add unit + acceptance tests, including cross-adapter parity.
Wiring the quota-enforcement saga¶
UsageMeterQuotaEnforcementStateMachine exists but its UsageReportedForQuotaInboundEvent topic is not registered. To activate it, add the inbound topic to MeteringMassTransitTopology.ConfigureInboundConsumedMessageTopology and the corresponding consumer registration (docs/backlog/metering-gap-backlog.md).
Adding baseline dimensions¶
Baseline dimensions (api.requests, storage.gb) are hardcoded in DefaultUsageMetersProcessor. Add new baseline dimensions there so they are provisioned on tenant activation.
Keep it counter-based¶
This context is intentionally not a time-series store. If long-term usage history is needed, emit usage-recorded events to a downstream analytics sink rather than storing rows here.