You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An earlier version of this issue claimed gateway usage metering emitted unresolvable subjects and that "all usage is rejected." That was wrong. Confirmed against the consumer code (milo-os/billing, internal/controller/consumer).
The consumer attributes usage by project name: consumer.go strips projects/ from the CloudEvent subject and matches the remainder against BillingAccountBinding.spec.projectRef.name (billingaccountbinding_cache.go).
The NSO VRL already builds the subject as projects/<project-name> — correct, no change needed.
attribution_failure fires when a project has no active BillingAccountBinding (or its account isn't Ready). So the high reject volume on prod is dominated by unbilled / test projects — expected, not a derivation bug. Accepted usage is republished to billing.usage.<project>.valid (no success counter), which is why "no accepted metric" looked like total failure but isn't.
The production broker outage (datum-cloud/infra#3448) is a separate problem — event volume against an unsized single-replica stream, independent of attribution.
What's actually actionable
Harden the model against silent regression — done in test(billing): pin usage subject to project name + fix metering doc #287: pins the billing e2e subject to projects/<project-name> (it previously accepted any subject) and corrects the design doc, which called project_name a mere "dimension."
Investigate malformed subjects. A subset of rejected project values are malformed — leading-underscore _datum-cloud, 0-datum-internal-anchor. These are a real (smaller) derivation/injection bug: is idx.ProjectNames[dsNS] returning a malformed name, or does a specific route class produce it?
Confirm no billable project is wrongly rejected. Cross-check the rejected project set against projects that do have an active BillingAccountBinding; any overlap is a real attribution bug beyond the malformed set.
Corrected understanding
Important
An earlier version of this issue claimed gateway usage metering emitted unresolvable subjects and that "all usage is rejected." That was wrong. Confirmed against the consumer code (
milo-os/billing,internal/controller/consumer).consumer.gostripsprojects/from the CloudEvent subject and matches the remainder againstBillingAccountBinding.spec.projectRef.name(billingaccountbinding_cache.go).projects/<project-name>— correct, no change needed.attribution_failurefires when a project has no active BillingAccountBinding (or its account isn't Ready). So the high reject volume on prod is dominated by unbilled / test projects — expected, not a derivation bug. Accepted usage is republished tobilling.usage.<project>.valid(no success counter), which is why "no accepted metric" looked like total failure but isn't.What's actually actionable
projects/<project-name>(it previously accepted any subject) and corrects the design doc, which calledproject_namea mere "dimension."projectvalues are malformed — leading-underscore_datum-cloud,0-datum-internal-anchor. These are a real (smaller) derivation/injection bug: isidx.ProjectNames[dsNS]returning a malformed name, or does a specific route class produce it?projectset against projects that do have an active BillingAccountBinding; any overlap is a real attribution bug beyond the malformed set.