Source control correlation
When a cost anomaly fires, StackSpend automatically looks for the source-control changes — deployed pull requests and commits — that landed just before it and may have contributed, ranks the most likely one, and can explain why with the actual diff. It connects a spend spike to the code behind it, inside StackSpend.
What it does
After an anomaly is detected, StackSpend finds the deployments and pull requests that shipped in the window before the spike and surfaces the ones most likely to have contributed — ranked, with evidence, in a Change log on the anomaly’s detail page. For the strongest candidate it can run an AI assessment that reads the real diff and points at the specific lines.
It answers the question every team asks after a spend spike: “what did we ship?” — without leaving StackSpend to dig through Git history.
How it works
There is nothing to configure beyond connecting a provider. For each anomaly StackSpend:
- finds successful deployments for the affected service in the window before the spike;
- resolves each deployment to the pull requests it shipped, and pulls their changed files;
- ranks each change by timing (how close to the spike), whether the changed code touches the provider/service that spiked, and whether the diff contains a cost-moving pattern (a model swap, a higher
max_tokens, an added retry, a removed cache, a more frequent cron, a scaled-up instance count, and so on); - shows the ranked candidates, and for the strongest one runs the AI assessment.
Connecting your source control
Open Source Control settings
Install the StackSpend GitHub App
That's it
StackSpend reads repository metadata, pull requests, deployments, and file diffs for the repositories you select. It does not write to your repositories. GitHub is supported today; more providers are planned.
The Change log
On an anomaly’s detail page, the Change log lists the ranked candidate changes. For each you can see the PR title, author and confidence, open the pull request in your provider, and view the diff inline to investigate without leaving StackSpend. If correlation hasn’t run yet, Find related changes triggers it on demand.
AI assessment
For a strong candidate, StackSpend runs an AI assessment over the actual diff and returns a structured, evidence-grounded read:
- Likelihood the change contributed (changes ruled out are hidden);
- The suspect lines from the diff, with why each matters;
- How to verify — a concrete check you can run;
- A suggested remediation and whether it’s a clean revert or a forward-fix.
The assessment is grounded only in what the diff shows — it does not speculate about traffic, prices, or changes it wasn’t given. It runs automatically for the most likely candidate; you never have to ask for it.