Skip to main content

GitLab data ingestion

GitLab records what changed and who changed it. Sending those events to Coralogix puts that history next to your runtime telemetry, so a spike in errors can be lined up against the push, merge, or pipeline that preceded it.

The Contextual Data integration generates the webhook URL; GitLab posts to it.

Note

To tag Coralogix version benchmarks from a GitLab pipeline instead, see GitLab version tags.

What you need

  • A GitLab project you have permission to configure webhooks on.
  • A Coralogix API key. You can create one during setup.
  • An application and subsystem name to file the events under.

Generate the URL in Coralogix

1.
Open the GitLab integration

Select Data Flow, then Contextual Data, then GitLab, then Add, then Add new.

2.
Enter the integration details

Enter a Name. Supply Your API Key or select Create new key. Enter an App Name and Subsystem Name.

3.
Generate the URL

Select Generate URL and copy the result. It has the form https://integrations.<cluster URL>/v1/gitlab/v1/events/<token>. You need both the whole URL and its trailing token in the next section.

Coralogix GitLab integration details form with name, API key, app name, and subsystem name fields

Shows the form that produces the webhook URL GitLab posts to.

Create the webhook in GitLab

4.
Open the webhook settings

Sign in to GitLab, open the project you want to monitor, then select Settings, then Webhooks.

5.
Enter the URL and token

Paste the generated URL into URL, and paste the token from the end of that URL into Secret token. GitLab sends the token in the X-Gitlab-Token header so Coralogix can validate the payload.

6.
Pick the triggers

Select the events you want forwarded under Trigger.

GitLab webhook settings with the URL and Secret token fields highlighted and the trigger checkboxes below

Shows the two fields Coralogix supplies and the event types that fire the webhook.

7.
Test and save

Optionally select Test. Anything other than 200 OK means the configuration is wrong. Then select Add webhook.

Last updated on