|
1 | 1 | --- |
2 | 2 | ms.subservice: azure-devops-service-hooks |
3 | | -ms.topic: conceptual |
4 | | -title: Create a service hook for Azure DevOps Services and Azure DevOps Server with Datadog. |
5 | | -description: Use Datadog with your Azure DevOps Services organization |
| 3 | +ms.topic: how-to |
| 4 | +title: Create a Service Hook for Azure DevOps with Datadog |
| 5 | +description: Find out how to use service hooks to send Azure DevOps events to Datadog so you can build dashboards and monitors from the event metrics and data. |
6 | 6 | ms.assetid: 7472f06c-11f3-4603-953c-9a0de5abe29d |
7 | 7 | ms.author: chcomley |
8 | 8 | author: chcomley |
9 | 9 | monikerRange: "<=azure-devops" |
10 | | -ms.date: 11/03/2020 |
| 10 | +ms.date: 06/26/2025 |
| 11 | +# customer intent: As a developer, I want to find out how to use service hooks to send Azure DevOps events to Datadog so that I can build dashboards and monitors from the event metrics and data. |
11 | 12 | --- |
12 | | -# Create a service hook for Azure DevOps with Datadog |
| 13 | +# Create a service hook for Azure DevOps with Datadog |
13 | 14 |
|
14 | | -[!INCLUDE [version-gt-eq-2019](../../includes/version-gt-eq-2019.md)] |
| 15 | +[!INCLUDE [Azure DevOps Services | Azure DevOps Server 2022 | Azure DevOps Server 2020](../../includes/version-gt-eq-2020.md)] |
15 | 16 |
|
16 | | -Learn how to create events and metrics in Datadog in response to events from Azure DevOps. Use these metrics and events in Datadog to create dashboards, troubleshoot issues, and create monitors to alert you of critical issues. Datadog accepts all Azure DevOps event types. |
| 17 | +You can create events and metrics in Datadog in response to events in Azure DevOps. In Datadog, you can use these metrics and events to create dashboards, troubleshoot issues, and create monitors to alert you to critical issues. Datadog accepts all Azure DevOps event types. |
| 18 | + |
| 19 | +This article shows you how to use service hooks to send Azure DevOps events to Datadog. |
| 20 | + |
| 21 | +::: moniker range="<= azure-devops-2020" |
17 | 22 |
|
18 | 23 | > [!IMPORTANT] |
19 | | -> The Datadog feature might not be turned on by default for Azure DevOps Server 2019 and 2020, which is a known issue. Until it resolves, you can use the following SQL command in your config database to turn on the feature: |
20 | | -`exec prc_SetRegistryValue 1, '#\FeatureAvailability\Entries\ServiceHooks.Consumers.datadog\AvailabilityState\', 1` |
| 24 | +> The Datadog feature might not be turned on by default in Azure DevOps Server 2020 and 2019, which is a known issue. Until it's resolved, you can use the following SQL command in your **Tfs_Configuration** database to turn on the feature: |
| 25 | +> |
| 26 | +> `exec prc_SetRegistryValue 1, '#\FeatureAvailability\Entries\ServiceHooks.Consumers.datadog\AvailabilityState\', 1` |
| 27 | +
|
| 28 | +::: moniker-end |
21 | 29 |
|
22 | 30 | ## Prerequisites |
23 | 31 |
|
24 | 32 | | Category | Requirements | |
25 | 33 | |--------------|-------------| |
26 | 34 | |**Permissions**| - Member of the [Project Collection Administrators group](../../organizations/security/look-up-project-collection-administrators.md). Organization owners are automatically members of this group.<br>- **Edit subscriptions** and **View subscriptions** permissions set to **Allow**. By default, only project administrators have these permissions. To grant the permissions to other users, you can use the command-line tool or the [Security](/rest/api/azure/devops/security/?view=azure-devops-rest-6.0&preserve-view=true) REST API.| |
27 | | -|**Tools**|[Datadog](https://aka.ms/AzureDevOpsDataDog). In the Datadog application, go to [Integrations > API](https://aka.ms/AzureDevOpsDataDogAPI), create a new key or select an existing one, and then copy the key to your clipboard. | |
| 35 | +|**Tools**|[Datadog](https://aka.ms/AzureDevOpsDataDog). In the Datadog application, go to your profile and then select **Organization Settings** > **API Keys**. Create a new key or select an existing one, and then copy the key to your clipboard. | |
| 36 | + |
| 37 | +## Send Azure DevOps events to Datadog |
| 38 | + |
| 39 | +To send Azure DevOps events to Datadog, you set up a subscription for each type of event. |
| 40 | + |
| 41 | +### Create a subscription for an event |
| 42 | + |
| 43 | +1. Go to your Azure DevOps project, select **Project settings**, and then select **Service hooks**. Alternately, go to `https://{organization-name}/{project-name}/_settings/serviceHooks`. |
| 44 | + |
| 45 | +1. Select **Create subscription**. |
| 46 | + |
| 47 | + :::image type="content" source="../media/azure-devops-create-subscription.png" alt-text="Screenshot of the Service Hooks page of an Azure DevOps project. The Create subscription button is highlighted."::: |
| 48 | + |
| 49 | +1. In the list of services, select **Datadog**, and then select **Next**. |
| 50 | + |
| 51 | + :::image type="content" source="../media/select-datadog.png" alt-text="Screenshot of the Service page in the New service hooks subscription wizard. In the service list, Datadog is highlighted. Next is also highlighted."::: |
28 | 52 |
|
29 | | -## Start sending Azure DevOps events to Datadog |
| 53 | +1. Select an event to trigger on, configure any filters that you want to use, and then select **Next**. |
30 | 54 |
|
31 | | -1. Go to **Project settings** > **Service hooks**: `https://{orgName}/{project_name}/_settings/serviceHooks`. |
| 55 | + :::image type="content" source="../media/datadog-trigger-event.png" alt-text="Screenshot of the Trigger page in the New service hooks subscription wizard. The event list, two filters, and the Next button are highlighted."::: |
32 | 56 |
|
33 | | -2. Select **Create subscription**. |
| 57 | +1. Configure the action to perform when the event happens: |
34 | 58 |
|
35 | | -  |
| 59 | + - Under **Datadog API Key**, enter your Datadog API key. |
36 | 60 |
|
37 | | -3. Choose **Datadog** among the list of services, and then choose **Next**. |
| 61 | + - Under **Datadog Account Type**, select your account type. You can determine your account type from the hostname of the URL that your Datadog account uses. |
38 | 62 |
|
39 | | - :::image type="content" source="../media/select-datadog.png" alt-text="Screenshot with red box around Datadog and Next selections."::: |
| 63 | + | URL hostname | Account type | |
| 64 | + | --- | --- | |
| 65 | + | app.datadoghq.com | US | |
| 66 | + | app.datadoghq.eu | EU | |
| 67 | + | us3.datadoghq.com | US3 | |
| 68 | + | us5.datadoghq.com | US5 | |
| 69 | + | ap1.datadoghq.com | AP1 | |
| 70 | + | app.dog-gov.com | GOV | |
40 | 71 |
|
41 | | -4. Select an event to trigger on, configure any filters, and then select **Next**. |
| 72 | +1. To verify that Azure DevOps can use your configuration settings and successfully create a subscription, select **Test**. |
42 | 73 |
|
43 | | - :::image type="content" source="../media/datadog-trigger-event.png" alt-text="Screenshot of configuration fields for triggering event in Azure DevOps."::: |
| 74 | +1. To finish creating the subscription, select **Finish**. |
44 | 75 |
|
45 | | -5. Configure the action to perform. |
46 | | - - Paste (ctrl+v) your Datadog API Key into the required field. |
47 | | - - Indicate whether your Datadog account is US or EU. |
| 76 | + :::image type="content" source="../media/datadog-api-key-account-type-selection.png" alt-text="Screenshot of the Action page in the New service hooks subscription wizard, with a key and an account type visible and Test and Finish highlighted."::: |
48 | 77 |
|
49 | | -6. Choose **Test** to verify that Azure DevOps can use the provided configuration and successfully create a subscription. |
| 78 | +### Add subscriptions for other events |
50 | 79 |
|
51 | | -7. Once verified, choose **Finish** to complete the creation of subscription. |
| 80 | +Repeat the steps in [Create a subscription for an event](#create-a-subscription-for-an-event) for each event type you want to send to Datadog. Datadog accepts and encourages users to send all event types. |
52 | 81 |
|
53 | | - :::image type="content" source="../media/datadog-api-key-account-type-selection.png" alt-text="Screenshot of where you select and configure the action to perform."::: |
| 82 | +## Use your data in Datadog |
54 | 83 |
|
55 | | -8. Repeat steps 2-7 for each event type you want to send to Datadog. Datadog accepts and encourages users to send all event types. |
56 | | -9. Go to [Datadog](https://app.datadoghq.com/account/login) to see events and metrics start to flow into your environment. |
| 84 | +As events occur and their data and metrics start to flow into Datadog, you can set up dashboards and monitors. To get started, go to [Datadog](https://app.datadoghq.com/account/login). |
57 | 85 |
|
58 | 86 | ## FAQs |
59 | 87 |
|
60 | 88 | ### Q: Can I create service hook subscriptions programmatically? |
61 | 89 |
|
62 | | -A: Yes. For more information, see [Create a service hooks subscription programmatically](../create-subscription.md). Submit to either of the following Datadog endpoints: |
| 90 | +A: Yes. For more information, see [Create a service hook subscription programmatically](../create-subscription.md). Your Datadog account type determines the endpoint that your subscription should submit requests to. Use one of the following endpoints: |
63 | 91 |
|
64 | | -- **US:** `https://app.datadoghq.com/intake/webhook/azuredevops?api_key=<API_KEY>` |
65 | | -- **EU:** `https://app.datadoghq.eu/intake/webhook/azuredevops?api_key=<API_KEY>` |
66 | | -- **US3:** `https://us3.datadoghq.com/intake/webhook/azuredevops?api_key=<API_KEY>` |
67 | | -- **US5:** `https://us5.datadoghq.com/intake/webhook/azuredevops?api_key=<API_KEY>` |
68 | | -- **AP1:** `https://ap1.datadoghq.com/intake/webhook/azuredevops?api_key=<API_KEY>` |
69 | | -- **Gov:** `https://app.ddog-gov.com/intake/webhook/azuredevops?api_key=<API_KEY>` |
| 92 | +| Account type | Endpoint | |
| 93 | +| --- | --- | |
| 94 | +| US | `https://app.datadoghq.com/intake/webhook/azuredevops?api_key=<API-key>` | |
| 95 | +| EU | `https://app.datadoghq.eu/intake/webhook/azuredevops?api_key=<API-key>` | |
| 96 | +| US3 | `https://us3.datadoghq.com/intake/webhook/azuredevops?api_key=<API-key>` | |
| 97 | +| US5 | `https://us5.datadoghq.com/intake/webhook/azuredevops?api_key=<API-key>` | |
| 98 | +| AP1 | `https://ap1.datadoghq.com/intake/webhook/azuredevops?api_key=<API-key>` | |
| 99 | +| Gov | `https://app.ddog-gov.com/intake/webhook/azuredevops?api_key=<API-key>` | |
70 | 100 |
|
71 | 101 | ### Q: How can I use these events in Datadog? |
72 | 102 |
|
73 | | -A: Azure DevOps events that are sent to Datadog are useful for creating dashboards, setting up monitors, and finding correlations during troubleshooting. You can also use them to get insights into how your developer operations processes affect application performance. |
| 103 | +A: Azure DevOps events that are sent to Datadog are useful for creating dashboards, setting up monitors, and finding correlations during troubleshooting. You can also use event data to get insights into how processes in your developer operations affect application performance. |
74 | 104 |
|
75 | 105 | ### Q: What event types can I send to Datadog? |
76 | 106 |
|
|
0 commit comments