DEVOPS

Attribute a Datadog cost spike to its owning service and PR, alert in Slack

When Datadog flags a cloud-cost anomaly, this workflow identifies the service tag driving the spend, finds the most recent merged PR that touched that service.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerwebhook
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerDatadog cost-anomaly monitor webhookDatadogDatadog
  • LogicParse offending tag and spike start time
  • LogicDrop if dollar delta below threshold
  • ActionFind merged PRs touching that service before the spikeGitHubGitHub
  • LogicRank suspects by merge-time proximity
  • OutputPost attributed alert to on-call Slack channelSlack

What it does

Turns a raw cost-anomaly alert into an actionable attribution. It reads the anomaly's offending dimension (usually a `service` or `team` tag), correlates the spend jump to a deploy window, finds the merged GitHub PR that shipped just before the spike, and posts a single Slack message naming the service, the dollar delta, and the suspect PR with author.

When to use it

Use it when your team gets paged for AWS/cloud cost anomalies but spends 20 minutes manually cross-referencing which deploy caused them. Best for teams that tag infra by service and merge frequently.

How it works

  1. 1Datadog fires a cost-anomaly monitor webhook into the workflow.
  2. 2The flow parses the alerting tag and the anomaly's start timestamp from the payload.
  3. 3A logic step checks whether the delta clears a dollar threshold; small blips are dropped.
  4. 4It queries GitHub for PRs merged into the default branch in the hours before the spike that touched paths owned by that service.
  5. 5It ranks candidates by merge-time proximity to the spike onset.
  6. 6A Slack message lands in the on-call channel with the service, cost delta, and the top suspect PR plus author handle.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect DatadogMetrics, traces, log search.
  2. 2
    Connect GitHubRepos, issues, pull requests, actions.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.