With this extension for Datadog CI Visibility, you can more quickly connect your Azure Pipelines to Datadog to gain comprehensive visibility into the performance of your pipelines, stages, and jobs.
What you'll need from Datadog
- API Key: Your Datadog API key. This key is created by your Datadog organization.
- Datadog site: Which Datadog site to connect and send data to.
Setting up the integration
Install this Datadog CI Visibility for Azure Pipelines extension in your Azure organization. This will install a webhook consumer.
After the extension is installed, you can use it from the Service hooks section within your Project Settings in Azure Pipelines.
All 3 supported types of events are required and must be enabled individually. If one or more events are not enabled, the installation will be incomplete and lead to unexpected behavior in Datadog. The events are:
- run state changed
- run stage state changed
- run job state changed
If you want to enable the hooks for many or all your Azure projects we provide a script to help you do it through the Azure API. For this you'll need:
- Azure DevOps username
- Azure DevOps API Token
- Azure DevOps organization name
The script only needs python3 and the requests package. For more info:
service_hooks.py --help
Example to enable for all the projects:
./service_hooks.py \
--dd-api-key ******************** \
--az-user "John Doe" \
--az-token ********************** \
--az-org datadoghq \
--threads 4
Example to enable only in a couple of projects:
./service_hooks.py \
--dd-api-key ******************** \
--az-user "John Doe" \
--az-token ********************** \
--az-org datadoghq \
projectName1 projectName2