Azure DevOps Server is not officially supported.

CI Visibility is not available in the selected site () at this time.

Overview

Azure Pipelines is a continuous integration and delivery service that supports any language, platform, or cloud.

Set up tracing on Azure Pipelines to gain real time insights into your CI/CD workflows, track pipeline performance, analyze inefficiencies, and manage your deployment operations.

Compatibility

Pipeline VisibilityPlatformDefinition
Custom tags and measures at runtimeCustom tags and measures at runtimeConfigure custom tags and measures at runtime.
Custom spansCustom spansConfigure custom spans for your pipelines.

Configure the Datadog integration

The Datadog integration for Azure Pipelines works by using service hooks to send data to Datadog.

  1. Install the Datadog CI Visibility extension from the Azure Marketplace. There are several extensions starting with Datadog, make sure that you are installing the Datadog CI Visibility extension.

  2. For each project, go to Project settings > Service hooks in Azure DevOps and select the green plus (+) icon to create a subscription.

  3. Create a new subscription to the Datadog CI Visibility service for each of the following webhook types:

    • Run state changed
    • Run stage state changed
    • Run job state changed
    • Run stage approval completed
    • Run stage waiting for approval
  4. Click Next to continue to the next step and set the following:

  5. Click Finish.

All 5 supported types of events are required and must be enabled individually. Not enabling one or more events results in an an incomplete installation, leading to unexpected behavior in Datadog.

複数プロジェクトの一括構成

If you want to enable the hooks for many or all your Azure projects, Datadog provides a script to help you do it through the Azure API.

スクリプトを実行するには、以下が必要です。

  • Azure DevOps のユーザー名
  • An Azure DevOps API Token
  • Azure DevOps の組織名

The script only needs python3 and the requests package. For more information, run:

./service_hooks.py --help

このスクリプトは環境変数 DD_API_KEYDD_SITE、フラグパラメーター --dd-api-key--dd-site をサポートします。

すべてのプロジェクトでフックを有効にする場合の例:

./service_hooks.py \
    --dd-api-key ******************** \
    --az-user "John Doe" \
    --az-token ********************** \
    --az-org datadoghq \
    --threads 4

指定したプロジェクトでフックを有効にする場合の例:

./service_hooks.py \
    --dd-api-key ******************** \
    --az-user "John Doe" \
    --az-token ********************** \
    --az-org datadoghq \
    projectName1 projectName2

ジョブログ収集を有効にする

Azure Log Collection is in private beta. To request access, fill out this form.
Note: Job log collection is not available for PCI-compliant organizations.

Datadog supports log collection for your Azure DevOps pipelines. To enable it:

  1. Install a Datadog app registration on your Azure console. Follow the steps within the Azure integration.

  2. Add the Datadog app registration to your Azure DevOps organization and to every project for which you want to enable Log Collection. You can do this by going to “Organization settings” in your DevOps console. You may select “Add to all projects” to configure all projects in bulk.

Note: Logs are billed separately from CI Visibility. Log retention, exclusion, and indexes are configured in Logs Settings. Logs for Azure jobs can be identified by the datadog.product:cipipeline and source:azurepipelines tags.

Datadog でパイプラインデータを視覚化する

The CI Pipeline List and Executions pages populate with data after the workflows finish.

The CI Pipeline List page shows data for only the default branch of each repository.

参考資料