GitLab annotations
Annotations overlay event markers on dashboard panels, helping you correlate GitLab activity with metric changes. For example, you can mark when commits, deployments, or releases occur to see how they affect system behavior.
The GitLab data source supports annotations using any of its resource types. You configure a standard GitLab query and map fields from the result to annotation properties.
For general information about annotations, refer to Annotate visualizations.
Create an annotation query
To add GitLab annotations to a dashboard:
- Navigate to Dashboard settings > Annotations.
- Click Add annotation query.
- Enter a name for the annotation (for example,
Recent commits). - Select your GitLab data source.
- Select a Resource Type from the drop-down and configure the query fields as you would in the query editor.
- Under Field mappings, configure the following:
- Time: Select the field to use as the annotation timestamp (for example,
authored_atfor commits orcreated_atfor deployments). - Text: Select the field to use as the annotation text (for example,
author_namefor commits ornamefor releases).
- Time: Select the field to use as the annotation timestamp (for example,
- Optionally, set a color using the Color picker.
- Click Apply to save.
Field mapping
The GitLab data source maps query result fields to annotation properties. You can customize which fields are used for each property:
Example: Annotate commits on a dashboard
To mark each commit as an annotation on your panels:
- Add an annotation query with the GitLab data source.
- Select resource type Commits.
- Enter the Project Id.
- Optionally, filter by branch using the Ref field.
- Set Time to
authored_at. - Set Text to
author_name.
Each commit within the dashboard time range appears as a vertical marker on your panels.
Example: Annotate deployments
To mark deployments on your panels:
- Add an annotation query with the GitLab data source.
- Select resource type Deployments.
- Enter the Project Id.
- Optionally, filter by Status Query (for example,
successto show only successful deployments). - Set Time to
created_at. - Set Text to
environment.
Example: Annotate releases
To mark releases on your panels:
- Add an annotation query with the GitLab data source.
- Select resource type Releases.
- Enter the Project Id.
- Set Time to
released_at. - Set Title to
name. - Set Text to
description.
Each release within the dashboard time range appears as a marker, making it easy to correlate releases with changes in metrics.
Example: Annotate merged merge requests
To mark merged merge requests on your panels:
- Add an annotation query with the GitLab data source.
- Select resource type Merge Requests.
- Enter the Project Id.
- Set State to
merged. - Set Time to
merged_at. - Set Title to
title. - Set Text to
author.
Example: Annotate failed pipelines
To mark failed pipelines on your panels:
- Add an annotation query with the GitLab data source.
- Select resource type Pipelines.
- Enter the Project Id.
- Set Status to
failed. - Set Time to
created_at. - Set Text to
ref.
Failed pipeline markers help you identify which branch or tag triggered a failure and correlate it with changes in your dashboards.



