ENGINEERING

Datadog Flake-Rate Threshold to Linear Quarantine

Polls Datadog CI Test Visibility on a schedule, finds tests whose flake rate crosses a threshold, and files a Linear quarantine ticket assigned to the last committer.

CategoryEngineering
Enginesim
Difficultyadvanced
Triggerschedule
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerDaily schedule
  • ActionQuery Datadog flake rates over 7 daysDatadogDatadog
  • LogicFilter tests above flake-rate threshold
  • ActionResolve last committer per test fileGitLabGitLab
  • ActionCreate Linear quarantine ticket and assignLinearLinear
  • OutputPost daily quarantine summary to SlackSlack

What it does

This workflow watches your Datadog CI Test Visibility metrics and catches tests that have become statistically flaky over a rolling window — not just ones that failed once. When a test's flake rate exceeds your threshold, it opens a Linear quarantine ticket with the trend data and assigns it to whoever last changed the test.

When to use it

Use it when you already ship test results to Datadog and want a data-driven quarantine policy (e.g. "quarantine any test flaking more than 5% over 7 days") rather than reacting to single red builds.

How it works

  1. 1A daily schedule kicks off the run.
  2. 2The flow queries Datadog CI Test Visibility for per-test flake rates over the last 7 days.
  3. 3A logic step selects tests above the configured flake-rate threshold and excludes ones already quarantined.
  4. 4It looks up the last committer for each test file via the GitLab API.
  5. 5It creates a Linear issue in the Quarantine project, tagged with the flake rate and a Datadog dashboard link, assigned to that committer.
  6. 6It drops a summary of the day's new quarantines into a Slack channel.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect DatadogMetrics, traces, log search.
  2. 2
    Connect LinearIssues, projects, cycles, triage.
  3. 3
    Connect GitLabRepos, MRs, pipelines, registry.
  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.