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

Overview

CircleCI is a continuous integration and delivery platform that enables teams to build, test, and deploy software at scale.

Set up tracing on CircleCI to optimize the performance of your pipelines, improve collaboration across teams, and ensure consistent, compliant build processes.

Compatibility

Pipeline VisibilityPlatformDefinition
Partial retriesPartial pipelinesView partially retried pipeline executions.
Logs correlationLogs correlationCorrelate pipeline and job spans to logs and enable job log collection.
Custom spansCustom spansConfigure custom spans for your pipelines.
Custom pre-defined tagsCustom pre-defined tagsSet custom tags to all generated pipeline and job spans.
Custom tags and measures at runtimeCustom tags and measures at runtimeConfigure custom tags and measures at runtime.

Configure the Datadog integration

The Datadog integration for CircleCI works by using webhooks to send data to Datadog.

  1. For each project, go to Project Settings > Webhooks in CircleCI and add a new webhook:

    • Webhook URL: https://webhook-intake./api/v2/webhook/?dd-api-key=<API_KEY> where <API_KEY> is your Datadog API key.
    • Name: Datadog CI Visibility or any other identifier name that you want to provide.
    • Events: Select Workflow Completed and Job Completed.
    • Certificate verifications: Enable this check.
  2. Click Add Webhook to save the new webhook.

Configure multiple projects in bulk

You can enable the hooks for many or all of your CircleCI projects in bulk, using this Python script which calls the Circle CI API.

The script requires:

  • Python 3 and the requests package. For more info, run:
    ./service_hooks.py --help
    
  • Your Datadog API key
  • A Circle CI personal API token

To bulk-configure hooks for your projects:

  1. Log in to your Circle CI account and follow all the projects for which you want to enable the hooks. Optionally, use the Follow All button on the Projects page.

  2. Run the script either using environment variables DD_API_KEY and DD_SITE, or passing in flag parameters --dd-api-key and --dd-site:

    For example:

    ./service_hooks.py \
        --dd-api-key <DD_API_KEY> \
        --circle-token <CIRCLECI_TOKEN> \
        --dd-site  \
        --threads 4
    

Set custom tags

To set custom tags to all the pipeline and job spans generated by the integration, add to the Webhook URL a URL-encoded query parameter tags, with key:value pairs separated by commas. If a key:value pair contains any commas, surround it with quotes. For example, to add key1:value1,"key2: value with , comma",key3:value3, the following string would need to be appended to the Webhook URL:

?tags=key1%3Avalue1%2C%22key2%3A+value+with+%2C+comma%22%2Ckey3%3Avalue3

Integrate with Datadog Teams

To display and filter the teams associated with your pipelines, add team:<your-team> as a custom tag. The custom tag name must match your Datadog Teams team handle exactly.

Enable log collection

The Datadog CircleCI integration collects logs from your finished CircleCI jobs and forwards them to Datadog.

Note: Job log collection is not available for PCI-compliant organizations.

To install and configure this integration, follow the CircleCI setup guide.

Note: Logs are billed separately from CI Visibility. Log retention, exclusion, and indexes are configured in Logs Settings. Logs for CircleCI jobs can be identified by the datadog.product:cipipeline and source:circleci 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.

参考資料

PREVIEWING: safchain/fix-custom-agent