Include non-billable usage in GitLab Credits usage by product
What does this MR do and why?
The Total usage card on the GitLab Credits dashboard counts billable plus non-billable usage, but the Usage by product tab showed billable credits only and computed each Share against the billable total. Its rows don't add up to the card above them.
This MR:
- adds each product's non-billable usage, from the
nonBillableUsagethe dashboard already loads for the chart and the card, to that product's row in Usage by product; - computes Share against the Total usage card's total (
totalUsageCredits), so, with no Products filter, the rows add up to the card and the shares add up to 100% (each share is rounded on its own, so the sum can be off by a percent); - renames the
products-listproptotalUsedCreditstototalCredits, because it's no longer the billable total; - updates the GitLab Credits dashboard docs to say Usage by product includes non-billable usage.
It only uses data the page already fetches, so it needs no backend or CustomersDot change. As on the card:
- non-billable usage of products this instance doesn't display is left out;
- when
nonBillableUsageis unavailable or fails, the tab shows billable usage only.
Known limitation, not new: with a Products filter, each product's billable credits stay unfiltered, because GitLab's products query sends no flow types, while the total is filtered, so shares can go over 100%. This is pre-existing issue 1 in #633154 (closed). This MR only adds the filtered non-billable part to those rows. Fixing it needs backend and CustomersDot changes.
References
- Related to #633154 (closed)
- !260725 (merged): the Total usage card change this aligns with
- Usage by user and the user drill-down are handled separately, by adding
nonBillableUsageon the GitLab side. CustomersDot keepsproducts.creditsUsedbillable-only, so this MR's addition doesn't double count.
Screenshots or screen recordings
Local GDK, group with 108.15 billable and 1.46 non-billable credits (Total usage 109.61).
| Before | After | |
|---|---|---|
![]() |
![]() |
| Product rows | billable only | billable + non-billable (Orbit 106.61), adding up to 109.61, the Total usage card | | Share | divided by the billable total, 108.15 | divided by the Total usage total, 109.61, adding up to 100% |
How to set up and validate locally
- Set up GDK in SaaS mode with a local CustomersDot, as in "How to set up and validate locally" in !260725 (merged).
- In CustomersDot, seed non-billable usage (
SkipConsumption = true) for at least one product, for example withbin/populate_usage_data ... --team-member --skip-reason promo, and run enrichment. Or use/usage-billing-local-dataskill and ask for events in natural language. - Visit
/groups/<group>/-/settings/gitlab_credits_dashboardand open Usage by product. - Check that the rows add up to the Total usage card and that the shares add up to 100%.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

