CI Visibility is not available in the selected site () at this time.
Overview
GitLab is a DevOps platform that automates the software development lifecycle with integrated CI/CD features, enabling you to deploy applications quickly and securely.
Set up tracing in GitLab to collect data on your pipeline executions, analyze performance bottlenecks, troubleshoot operational issues, and optimize your deployment workflows.
View the amount of time pipelines have been running jobs. Gitlab refers to this metric as duration. Duration in Gitlab and execution time may show different values. Gitlab does not take into consideration jobs that failed due to certain kinds of failures (such as runner system failures).
GitLab >= 13.7.0 (self-hosted) with the datadog_ci_integration feature flag enabled
Configure the Datadog integration
Configure the integration on a project or group by going to Settings > Integrations > Datadog for each project or group you want to instrument.
Configure the integration on a project or group by going to Settings > Integrations > Datadog for each project or group you want to instrument.
You can also activate the integration at the GitLab instance level, by going to Admin > Settings > Integrations > Datadog.
Enable the datadog_ci_integrationfeature flag to activate the integration. Run one of the following commands, which use GitLab’s Rails Runner, depending on your installation type:
Then, configure the integration on a project by going to Settings > Integrations > Datadog for each project you want to instrument.
Note: Due to a bug in early versions of GitLab, the Datadog integration cannot be enabled at group or instance level on GitLab versions < 14.1, even if the option is available on GitLab's UI
For older versions of GitLab, you can use webhooks to send pipeline data to Datadog.
Note: Direct support with webhooks is not under development. Unexpected issues could happen. Datadog recommends that you update GitLab instead.
Test settings ボタンを使用してインテグレーションをテストできます (プロジェクトでインテグレーションを構成する場合にのみ使用できます)。成功したら、Save changes をクリックしてインテグレーションのセットアップを完了します。
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.
If you are using self-hosted GitLab runners, you can correlate jobs with the infrastructure that is running them. Datadog infrastructure correlation is possible using different methods:
Tagging runners with hostname
The GitLab runner must have a tag of the form host:<hostname>. Tags can be added while registering a new runner. As a result, this method is only available when the runner is directly running the job. This excludes executors that are autoscaling the infrastructure in order to run the job
(such as the Kubernetes, Docker Autoscaler, or Instance executors) as it is not possible to add tags dynamically for those runners.
Job logs are collected in Log Management and are automatically correlated with the GitLab pipeline in CI Visibility. Log files larger than one GiB are truncated.
For more information about processing job logs collected from the GitLab integration, see the Processors documentation.
ジョブログの収集を有効にするには
Click the Enable job logs collection checkbox in the GitLab integration Settings > Integrations > Datadog.
Enable the datadog_integration_logs_collectionfeature flag in your GitLab. This allows you to see the Enable job logs collection checkbox in the GitLab integration under Settings > Integrations > Datadog.
Click Enable job logs collection.
Save changes をクリックします。
注: ログは CI Visibility とは別に課金されます。ログの保持、除外、インデックスの構成は、ログの設定で行います。GitLab ジョブのログは Datadog.product:cipipeline と source:gitlab のタグで識別できます。