Skip to content

Meter Network Services edge-proxy usage into the billing pipeline #750

Description

@kevwilliams

Tracking enhancement — contributes the Network Services slice of the "Service instrumentation" gate in #681.

Builds on the service-catalog registration completed in network-services-operator #155 (design brief #156, Phase 1 implementation #165).

High-Level Summary

Network Services runs an Envoy Gateway–based edge proxy that routes HTTP traffic, terminates TLS, and enforces WAF/rate-limit policies for customers. As of PR #165 it is registered in the service catalog — a Service and a ServiceConfiguration declare HTTPRoute as the billable resource and four meters under the networking.datumapis.com/gateway/* family (request count, egress bytes, ingress bytes, connection seconds). That is declaration only; no usage is being measured yet.

This enhancement is Phase 2 of that design brief: wire the edge proxy's telemetry into the billing usage pipeline so real consumption flows proxy → Vector → Ingestion Gateway → Billing Consumer → Amberflo, attributed to a BillingAccount. It closes the loop between "we declared meters for Network Services" and "Network Services usage shows up in Amberflo and the portals" — exactly the end-to-end metering proof #681 is still missing.

This phase is measurement only, consistent with #681: no rates, no invoices, no charging.

Motivation

  • Billing and Metering for Datum Cloud using Integration of 3rd Party Metering Service #681 is blocked on real service instrumentation. Its "End-to-end metering proof" and "Service instrumentation" gates need actual services emitting CloudEvents. Compute and AI Assistant are wired; Network Services (which underpins AI Edge, DNS, Tunnels, gVPCs ingress) is declared but silent.
  • Catalog declarations are inert without an emission path. PR View Datum Cloud Users #165 shipped meters in Draft phase. Meter meterName and measurement.unit become immutable at Published — we want to validate them against real traffic before promotion, which requires emitting events now.
  • Retrofitting metering is expensive. The four billing signals exist today only as operational Prometheus counters with no billing attribution. Getting the collection path right while the meters are still Draft costs a few PRs; getting it wrong after promotion costs a new meter family + SDK change + customer migration.
  • The design investigation is already done. PR Project Settings Page #156 evaluated three collection approaches and landed on a recommendation (Vector access-log scraping + a controller-side connection emitter). This enhancement is about executing that recommendation and resolving its remaining open decisions — not re-opening the design.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions