DEVOPS

Zero-Traffic Feature-Flag Retirement from Datadog Metrics

Checks Datadog flag-evaluation metrics weekly and proposes retiring any flag that has had zero evaluations for 30 days, opening a draft PR and a Linear cleanup ticket.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerWeekly schedule fires
  • ActionQuery flag evaluation counts in DatadogDatadogDatadog
  • LogicIsolate flags with zero traffic for 30d
  • ActionOpen draft removal PRGitHubGitHub
  • ActionFile cleanup ticket in LinearLinearLinear
  • OutputPost cold-flag summary to SlackSlack

What it does

Looks at how often each feature flag is actually evaluated in production using Datadog metrics, and flags any that have gone completely cold. A flag with zero evaluations for 30 days is almost certainly dead code, so the workflow drafts a removal PR and files a tracking ticket.

When to use it

Use it when sunset dates aren't reliable but you do emit a flag-evaluation metric. Traffic, not a calendar field, decides what's safe to remove.

How it works

  1. 1A weekly schedule starts the run.
  2. 2Datadog is queried for per-flag evaluation counts over the last 30 days.
  3. 3A logic step isolates flags with a count of zero.
  4. 4GitHub opens a draft PR removing each cold flag so a human confirms before merge.
  5. 5Linear creates a cleanup ticket linked to the PR and assigned to the flag's owner.
  6. 6A Slack summary lists every cold flag, its last-seen date, and the linked PR.

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 LinearIssues, projects, cycles, triage.
  4. 4
    Connect SlackChannels, DMs, threads, mentions.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    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.