Track GitLab CI health and what your pipelines cost
Break your GitLab compute spend down by project, spot the pipelines burning time and money, and retry or fix them from one screen.
Build me an app that shows how healthy my GitLab CI is and what it actually costs. The main screen has a date range picker at the top, defaulting to the last 30 days, and a table with one row per project showing pipeline count, failure rate, average duration, total pipeline minutes and an estimated cost for those minutes. Let me sort by any column, because the whole point is finding the project that is quietly eating the build budget.
Load the project list with List User Projects, then for each project pull the runs in the selected window with List Project Pipelines and fetch per pipeline detail with Get a Single Pipeline. That detail call is where the real numbers live: duration, queued_duration, status, ref, source and coverage. GitLab does not expose per pipeline compute minutes anywhere in its API, so treat pipeline duration as the minutes consumed, and be explicit in the interface that this is a derived estimate rather than billing data read from GitLab. Fetch project details concurrently and cache results within a session, since a 30 day window across a dozen projects is a lot of calls.
The per minute rate comes from a rate card tab in a Google Sheet that I maintain, read with the Google Sheets Get Values action. That tab has one row per runner tier, for example small, medium, large and self hosted, each with a dollars per minute value. Map each pipeline to a tier and multiply to get cost. If a pipeline's tier cannot be determined, fall back to a default rate row and show a quiet note saying how many rows used the fallback, so the number is never silently wrong. Give me a settings screen where I paste the spreadsheet ID and the tab range, plus a link that opens the sheet so I can edit rates directly.
Count failures on the default branch separately from failures on feature branches, using each pipeline's ref. Show them as two distinct numbers in the project row and flag default branch failures visually, because those are the ones blocking everybody, while a red feature branch is usually just someone mid work. The same split should appear anywhere a failure rate is shown.
Clicking a project row opens a detail view listing its recent pipelines with status, branch, trigger source, when it ran, how long it took and how long it sat queued before a runner picked it up. Surface queued time prominently and call it out when it is a large share of total time, since that is runner starvation rather than slow builds and it needs a completely different fix. Put a short summary at the top of the drill down: failure rate split by branch type, median and worst queue wait, and this project's share of total estimated spend.
From any pipeline row I can act. A failed pipeline gets a Retry button backed by Retry a Pipeline, and a running or stuck one gets a Cancel button backed by Cancel a Pipeline. Both should ask for confirmation, report the result inline, and refresh that row's status so I can see the action took effect.
Add a button that writes the current month's cost snapshot back to the spreadsheet using the Google Sheets Update Values action: one row per project with pipeline count, total minutes, estimated cost and the date range covered, written to a snapshot tab. Show me which range it wrote to and when the snapshot last ran.
Every project row and the drill down view get an Audit this project button that kicks off a background agent. The agent reads the project's .gitlab-ci.yml with Get Raw File Content, pulls the last few dozen runs with List Project Pipelines and Get a Single Pipeline, and looks for the patterns that burn time and money: jobs or pipelines retried over and over, scheduled pipelines that run constantly but that nobody appears to act on, stages that run in sequence despite having no dependency between them and could run in parallel, and missing caching for dependency installation. Our GitLab operation set does not cover individual jobs or job logs, so the agent must reason from the configuration file plus pipeline level history rather than digging into job output. It writes a short, specific set of recommendations ranked by how much time each would save, files them as a GitLab issue with Create an Issue named after the project, and shows the same write up inside the app attached to that project so I can read it without leaving. Show a running or complete status while it works, and keep past audits so I can compare over time.
In the app copy, say plainly that the rate card is a spreadsheet I control and that costs are estimates computed from pipeline duration, so nobody mistakes this screen for GitLab's own billing page.
What does this prompt do?
- Pick a date range and see every GitLab project side by side: how many pipelines ran, how often they failed, how long they took, total build minutes and what those minutes cost.
- Prices come from a rate card you keep in a Google Sheet, so each runner tier is costed your way, and the month's totals can be written back to that sheet as a snapshot.
- Failures on your main branch are counted and flagged separately from feature branch failures, so you can tell that everyone is blocked from someone's work in progress being red.
- Open any project to see its recent pipelines with run time and how long each one waited for a runner, retry a failed pipeline or cancel a stuck one, or hand the project to an agent that writes up where the time is going.
What do I need to use this?
- A GitLab account with access to the projects you want to track
- A Google account and a spreadsheet where you keep your per minute runner rates
- Permission to retry and cancel pipelines and to open issues, if you want to use the action buttons
How can I customize it?
- Update the rates in your spreadsheet whenever runner pricing changes, and the console picks up the new numbers the next time it loads.
- Set the default date range, such as the last 7 days, last month or the current quarter, to match how often you review spend.
- Choose what gets flagged: the failure rate, queue wait or monthly cost per project that should show a warning.
FAQs
Does this show my real GitLab bill?
Why does the rate card live in a spreadsheet instead of the app?
What does the queued time column tell me?
What does the Audit this project button actually do?
Do I need a paid GitLab plan for this to be useful?
Related templates
Stop buying stale lists. Reps run a saved search, work the results like an inbox, and only the accounts they approve ever reach your CRM.
Drag creators through Sourced to Wrapped on a board grouped by campaign, with audience stats on every card and a one-click brief for each creator.
Pick a repricing rule, send an assistant out to check competitor pages, then approve the new prices that clear your margin floor.
See the projected bounce rate for any outbound send before it goes out, and keep the launch button locked until the list is clean enough to be safe.
Pick any date range and see what each device in your home actually cost to run, not just how many kilowatt-hours it used.
Search three months of global coverage on your topic, rank the outlets actually writing about it, and draft a tailored pitch for each one.
Stop guessing where your CI minutes go.
Put every GitLab project's pipeline health and estimated spend on one screen, with the retries, cancels and fixes one click away.