---
title: Deployment Gates
description: >-
  Reduce deployment incidents by evaluating monitors and Watchdog Faulty
  Deployment Detection during a rollout, so your pipeline can halt releases when
  regressions are detected.
breadcrumbs: Docs > Deployment Gates
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Deployment Gates

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

A Deployment Gate is an automated checkpoint between your deployment stages. During a production rollout, the gate checks service health using signals Datadog already collects. When a rule fails, the gate returns a failing verdict so your pipeline can pause the rollout. This helps keep errors and other issues from reaching a wider user base.

When a gate fails, the [Evaluations](https://app.datadoghq.com/ci/deployment-gates/evaluations) page shows the deployed version, the failed rules, and why each rule failed. You can follow the associated traces to start investigating the problem.

{% image
   source="https://docs.dd-static.net/images/deployment_gates/evaluations_rule_failure.e675c5439780c618c56924ff5e5a1701.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/deployment_gates/evaluations_rule_failure.e675c5439780c618c56924ff5e5a1701.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="The Deployment Gates Evaluations page with a side panel showing a failed monitor rule evaluation." /%}

For setup instructions, see [Set up Deployment Gates](https://docs.datadoghq.com/deployment_gates/setup.md).

## How Deployment Gates work{% #how-deployment-gates-work %}

A Deployment Gate evaluates one or more rules to decide whether a deployment should proceed. It is defined for a given service and environment.

After receiving a gate evaluation verdict, your deployment pipeline decides what to do next—for example, halting the deployment or performing a rollback.

### Where gate configurations are stored{% #where-gate-configurations-are-stored %}

A Deployment Gate configuration can be:

- **Inline**: The gate is defined in code alongside your deployment configuration. The gate configuration is sent with each evaluation request. There is no setup in Datadog.
  - To create an inline gate, see [Set Up Inline Deployment Gates](https://docs.datadoghq.com/deployment_gates/setup/inline.md).
- **Preconfigured**: The gate is created and stored in Datadog.
  - To create a preconfigured gate, see [Set Up Preconfigured Deployment Gates](https://docs.datadoghq.com/deployment_gates/setup/preconfigured.md).

## Rules{% #rules %}

There are two types of rules: monitor rules and Watchdog Faulty Deployment Detection rules. A single gate can combine multiple rules of different types.

Rules can watch health indicators over a configurable period ranging from 1 minute to 2 hours.

### Monitor rules{% #monitor-rules %}

A monitor rule checks the state of one or more [monitors](https://docs.datadoghq.com/monitors.md) you have already set up in Datadog. The rule fails if a monitor enters an `Alert` or `No Data` status.

### Watchdog Faulty Deployment Detection rules{% #watchdog-faulty-deployment-detection-rules %}

A [Watchdog Faulty Deployment Detection](https://docs.datadoghq.com/watchdog/faulty_deployment_detection.md) rule compares the deployed version against previous versions of the same service. The rule fails if the analysis detects new types of errors or a significant increase in error rates.

## Evaluations{% #evaluations %}

An evaluation is a single run of a gate's rules against a specific deployment. Your pipeline requests a gate evaluation, and Datadog immediately returns an evaluation ID. The evaluation eventually resolves to `pass` or `fail`.

Evaluations for both inline and preconfigured gates appear on the [Evaluations](https://app.datadoghq.com/ci/deployment-gates/evaluations) page.

### Evaluation modes{% #evaluation-modes %}

There are two evaluation modes: dry run and active. You can set the evaluation mode separately on each gate and each rule. The mode determines whether their verdicts affect your deployment.

#### Dry run mode{% #dry-run-mode %}

Use dry run to see which deployments would pause and why, while deployments continue as usual.

The verdict of a gate in dry run mode is recorded on [Evaluations](https://app.datadoghq.com/ci/deployment-gates/evaluations) but doesn't affect your deployment. That is, a dry run gate always returns `pass` to your pipeline. A dry-run rule's verdict doesn't count toward its associated gate's verdict.

#### Active mode{% #active-mode %}

Use active mode when you're ready for your workflow to pause when a required check fails.

An active gate returns its true verdict (`pass` or `fail`) to your pipeline. An active rule's verdict counts toward the associated gate's verdict.

## Further reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Set up Deployment Gates](https://docs.datadoghq.com/deployment_gates/setup.md)
- [Catch incidents and pause faulty deployments automatically with Deployment Gates](https://www.datadoghq.com/blog/deployment-gates/)
- [Learn about Continuous Delivery Visibility](https://docs.datadoghq.com/continuous_delivery.md)
- [Learn how to set up CD Visibility](https://docs.datadoghq.com/continuous_delivery/deployments.md)
