DEVOPS

Retire Zero-Traffic Feature Flags Using Datadog Eval Metrics

Checks Datadog for flag-evaluation metrics and finds flags that haven't been evaluated in 30 days, then files a Linear removal ticket for each truly-dead flag.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerScheduled harvester run
  • ActionQuery Datadog for per-flag evaluation countsDatadogDatadog
  • LogicKeep flags with zero evaluations in 30 days
  • ActionConfirm flag still exists in registryPostgreSQLPostgres
  • OutputFile Linear retirement ticket per dead flagLinearLinear

What it does

Queries Datadog for per-flag evaluation counts, identifies flags that have received zero evaluations over the trailing 30 days, and opens a Linear ticket to retire each one. This catches flags that are dead in practice even if their kill-date hasn't arrived.

When to use it

Use this when kill-dates aren't reliable but you do emit a metric every time a flag is evaluated. Traffic-based detection is the most honest signal that a flag is safe to remove, since it proves no code path still depends on it.

How it works

  1. 1A scheduled run triggers the harvester.
  2. 2It queries Datadog for the `feature_flag.evaluations` metric grouped by flag key over the last 30 days.
  3. 3A logic step keeps only flags with a total evaluation count of zero.
  4. 4For each zero-traffic flag it cross-checks the registry in Postgres to confirm the flag still exists and isn't newly created.
  5. 5It creates a Linear issue per confirmed dead flag with the last-seen date and owning team, ready for an engineer to action.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect DatadogMetrics, traces, log search.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect LinearIssues, projects, cycles, triage.
  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.