CircleCI CI Visibility 설정
개요
CircleCI는 팀이 대규모로 소프트웨어를 빌드, 테스트 및 배포할 수 있도록 지원하는 지속적 통합 및 배포 플랫폼입니다.
CircleCI용 CI Visibility를 설정하여 파이프라인 성능을 최적화하고, 팀 간 협업을 개선하며, 일관되고 규정을 준수하는 빌드 프로세스를 보장하십시오.
호환성
용어
이 표는 Datadog CI Visibility와 CircleCI 간의 개념 매핑을 보여줍니다:
| Datadog | CircleCI |
|---|
| 파이프라인 | 워크플로 |
| 작업 | 작업 |
| Datadog에서 사용할 수 없음 | 단계 |
CircleCI용 Datadog 통합은 웹후크를 사용해 데이터를 Datadog으로 전송하는 방식으로 작동합니다.
각 프로젝트에 대해 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를 선택합니다.
Add Webhook를 클릭하여 새 웹훅을 저장합니다.
고급 구성
Datadog은 CircleCI API를 사용하여 여러 또는 모든 CircleCI 프로젝트에서 서비스 후크를 활성화하는 데 도움이 되는 script를 제공합니다. 이 스크립트에는 Python 3 및 requests 패키지가 필요합니다.
스크립트를 실행하려면 다음이 필요합니다:
- Datadog API 키
- CircleCI 개인 API 토큰
자세한 내용은 다음 명령을 실행하십시오:
./service_hooks.py --help
프로젝트에 대한 후크를 일괄 설정하려면:
CircleCI 계정에 로그인하고 후크를 활성화하려는 모든 프로젝트를 팔로우합니다. 선택적으로 프로젝트 페이지에서 Follow All 버튼을 사용합니다.
환경 변수 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
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