What CostGraph scrapes
Connect the gateway in Settings > Integrations and CostGraph serves this
target to the operator. Override the namespace or selector on the connection if
you run it somewhere else.
How the metric maps
gen_ai_client_token_usage becomes
costgraph_gen_ai_usage_total:
The unit is always
tokens.
Envoy AI Gateway also reports gen_ai_token_type="total". CostGraph reads the
input and output series and drops the total, so the same tokens are never
counted twice.
Attribute usage to your customers
Map a request header onto the metrics. This is a controller-wide setting, so every gateway that controller manages shares the mapping.customer.id arrives as the label customer_id: dots become
underscores on the Prometheus side.
AI gateways
Connecting, pricing, and sending usage yourself.