The extension for Datadog monitors as deployment gates is not available for the site.
You can also use Datadog monitors as gates to control release deployments in Azure Pipelines. This option allows you to automatically stop problematic deployments if an unhealthy state is detected in Datadog.
In Azure DevOps, go to Service Connections under your project settings and select New Service Connection.
Select Datadog from the list and press Next.
In the fields provided, add your Datadog API key and application key for the account you want to use, then enter a name and description to identify this Datadog account in Azure DevOps. Click Save. You can add additional service connections if you need to query monitors from multiple Datadog accounts.
Go to Azure Pipelines to configure your deployment. Here, there’s an option to add pre or post deployment conditions between stages. Select where you want to add a Datadog monitor, and then enable the toggle switch for Gates.
Click Add and select the option Query Datadog monitors.
Select the Datadog service connection then enter your monitor ID and the severity threshold you want to use. The severity threshold is the state of the monitor (either Alert or Warning) at which the task is failed.
Repeat steps 5-7 to add additional gates as needed in your deployment pipeline.
Note: Use composite monitors to monitor multiple conditions for the gates in your pipeline as part of a single health state for each stage.
The metrics and events generated from this integration do not incur any additional costs.
How long does this data persist in Datadog?
The data from this integration is held for 15 months, similar to other types of timeseries data in Datadog.
How long does it take for the events and metrics to display in Datadog?
The total latency has many variables, but in most cases the events and metrics display in Datadog within 30 seconds of the incident occurring.
What can you do with the Azure DevOps events and metrics in Datadog?
The events and metrics can be used like other events and metrics in Datadog, including building dashboards, setting up monitors, and troubleshooting.
How are the metrics for build duration and work item duration generated?
The build duration is generated from build completed events by taking the time difference between when the build was initiated to when it completed (measured in seconds).
The work item duration is generated from work item updated events by taking the time difference between the transition to Done and when the work item was created (measured in hours).
Note: If a Done work item is re-opened, the next time it is transitioned to Done another data point is generated. The initial data point is not modified, and the new data point still measures from the time the work item was initially created.
Your service hook subscription test returns a success message, why aren’t events arriving to Datadog?
The service hook subscription test only checks whether Azure DevOps is able to send events to Datadog. It does not validate your API key or your Datadog organization site (US or EU). Make sure that the API key and site are correct.