이 제품은 선택한 Datadog 사이트에서는 지원되지 않습니다. ().

개요

CircleCI는 팀이 대규모로 소프트웨어를 빌드, 테스트 및 배포할 수 있도록 지원하는 지속적 통합 및 배포 플랫폼입니다.

CircleCI용 CI Visibility를 설정하여 파이프라인 성능을 최적화하고, 팀 간 협업을 개선하며, 일관되고 규정을 준수하는 빌드 프로세스를 보장하십시오.

호환성

Pipeline Visibility플랫폼정의
부분 재시도부분 파이프라인부분적으로 재시도된 파이프라인 실행을 조회합니다.
로그 분석로그 분석관련 로그에 LLM 모델을 사용하여 실패한 CI 작업의 근본 원인을 분석합니다.
로그 상관관계로그 상관관계파이프라인 및 작업 스팬을 로그와 연관시킵니다. 로그 스토리지가 필요합니다.
사용자 지정 스팬사용자 지정 스팬파이프라인에 대한 사용자 지정 스팬을 구성합니다.
Custom pre-defined tagsCustom pre-defined tags모든 생성된 파이프라인 및 작업 스팬에 커스텀 태그를 설정합니다.
Custom tags and measures at runtime런타임 시 사용자 지정 태그 및 측정값런타임 시 custom tags and measures을 구성합니다.
임계 경로의 CI 작업 필터링임계 경로의 CI 작업 필터링임계 경로에 있는 작업별로 필터링합니다.
실행 시간실행 시간파이프라인이 작업을 실행하는 데 걸린 시간을 조회합니다.

용어

이 표는 Datadog CI Visibility와 CircleCI 간의 개념 매핑을 보여줍니다:

DatadogCircleCI
파이프라인워크플로
작업작업
Datadog에서 사용할 수 없음단계

Datadog 통합 구성

CircleCI용 Datadog 통합은 웹후크를 사용해 데이터를 Datadog으로 전송하는 방식으로 작동합니다.

  1. 각 프로젝트에 대해 CircleCI의 Project Settings > Webhooks로 이동하여 새 웹훅을 추가합니다.

    • Webhook Name: Datadog CI Visibility 또는 제공하려는 다른 식별자 이름.
    • Receiver URL: https://webhook-intake./api/v2/webhook/?dd-api-key=<API_KEY> 여기서 <API_KEY>은 Datadog API 키입니다.
    • Certificate verifications: 이 검사를 활성화합니다.
    • Events: Workflow Completed 및 Job Completed를 선택합니다.
  2. Add Webhook를 클릭하여 새 웹훅을 저장합니다.

고급 구성

여러 프로젝트를 일괄적으로 설정합니다

Datadog은 CircleCI API를 사용하여 여러 또는 모든 CircleCI 프로젝트에서 서비스 후크를 활성화하는 데 도움이 되는 script를 제공합니다. 이 스크립트에는 Python 3 및 requests 패키지가 필요합니다.

스크립트를 실행하려면 다음이 필요합니다:

  • Datadog API 키
  • CircleCI 개인 API 토큰

자세한 내용은 다음 명령을 실행하십시오:

./service_hooks.py --help

프로젝트에 대한 후크를 일괄 설정하려면:

  1. CircleCI 계정에 로그인하고 후크를 활성화하려는 모든 프로젝트를 팔로우합니다. 선택적으로 프로젝트 페이지에서 Follow All 버튼을 사용합니다.

  2. 환경 변수 DD_API_KEY 및 DD_SITE를 사용하거나 플래그 매개변수 --dd-api-key 및 --dd-site를 전달하여 스크립트를 실행합니다:

    예:

    ./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 Receiver 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 Receiver 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.

Manage job logs

Logs Analysis

Logs Analysis uses LLM models to classify job failures by root cause based on relevant logs coming from CircleCI.

For a full explanation, see the guide on using Logs Analysis.

Logs Analysis is enabled by default in Datadog. To receive CircleCI job logs for analysis, install and configure the integration as described in the CircleCI integration documentation. To manage Logs Analysis settings, go to CI/CD Repository settings, and configure Logs Analysis at the Datadog organization level or for the desired repositories.

Logs Storage

To enable Logs Storage, go to CI/CD Repository settings, and enable Logs Storage at the Datadog organization level or for the desired repositories.

Logs Storage is billed separately from CI Visibility. Log retention, exclusion, and indexes are configured in Log Management. Logs for CircleCI jobs can be identified by the datadog.product:cipipeline and source:circleci tags.

Visualize pipeline data in 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. For more information, see Search and Manage CI Pipelines.

Further reading