If you are a GitLab.com user and you want to early-adopt this integration, open a support ticket with GitLab requesting that the Datadog integration be enabled in your account.
If you manage your own GitLab installation and your version is recent enough, you can enable the feature flag yourself by executing the following commands that use GitLab’s Rails Runner depending on your installation type:
For Omnibus installations:
sudo gitlab-rails runner "Feature.enable(:datadog_ci_integration)"
For installations from source:
sudo -u git -H bundle exec rails runner -e production "Feature.enable(:datadog_ci_integration)"
kubectl exec -it <task-runner-pod-name> -- /srv/gitlab/bin/rails runner "Feature.enable(:datadog_ci_integration)"
Once the feature flag is enabled, configure the integration on a per project basis by going to Settings > Integrations > Datadog for each project you want to instrument. Mark it as active and paste a valid API key.
datadoghq.com is currently supported.
There are a couple of optional parameters:
gitlab-ci. Useful if you’re using more than one GitLab instance.
Test the integration with the Test settings button. After it’s successful, click Save changes to finish the integration set up.
As an alternative to using the native Datadog integration, you can use webhooks to send pipeline data to Datadog.
Note: The native Datadog integration is the recommended approach and the one that is actively under development. Use webhooks only if the native Datadog integration option is not available to you (for example, you have an older GitLab version and you’re not able to upgrade).
Go to Settings > Webhooks in your repository (or GitLab instance settings), and add a new webhook:
<API_KEY>is available here.
To set custom
service parameters, use query parameters in the webhooks URL:
Note: The Pipelines page shows data for only the default branch of each repository.
Additional helpful documentation, links, and articles: