Scale Intelligence■ Docs
Docs / The model / MeteredUsage

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
METEREDUSAGEfact at follows scopekindKindOfUsagein the kind's unitquantitycountwith its basiscostCostread from the telemetry context, never from an argumentcallerCallerthe tenant, brand or strategyscopeScopegrantidoptionalthe job's, the move's or the turn's keywork_keytexttrace_idtextprovidertextoptionalattimeKINDOFUSAGEthrough kindCOSTthrough costCALLERthrough callerSCOPEthrough scope
MeteredUsage is a fact at follows scope. The drawing shows its fields and the objects that they point at.
kind
fact
scope
follows
key
the call’s key and the kind
store
postgres+lake
family
operations

Fields#

fieldtyperequirednote
kindKindOfUsageyes
quantitycountyesin the kind’s unit
costCostyeswith its basis
callerCalleryesread from the telemetry context, never from an argument
scopeScopeyesthe tenant, brand or strategy
grantidno
work_keytextyesthe job’s, the move’s or the turn’s key
trace_idtextyes
providertextno
attimeyes

Routes that use it#

No route takes or returns MeteredUsage directly. The record holds it, and the objects that point at it reach it.