MeteredUsage.
One row per metered call, written by the metering middleware in the same unit of work as the call; a call whose row cannot be written does not complete
Figure 1MeteredUsagespecified
- kind
- fact
- scope
- follows
- key
- the call’s key and the kind
- store
- postgres+lake
- family
- operations
Fields#
| field | type | required | note |
|---|---|---|---|
kind | KindOfUsage | yes | |
quantity | count | yes | in the kind’s unit |
cost | Cost | yes | with its basis |
caller | Caller | yes | read from the telemetry context, never from an argument |
scope | Scope | yes | the tenant, brand or strategy |
grant | id | no | |
work_key | text | yes | the job’s, the move’s or the turn’s key |
trace_id | text | yes | |
provider | text | no | |
at | time | yes |
Routes that use it#
No route takes or returns MeteredUsage directly. The record holds it, and the objects that point at it reach it.