Drone annotations
The Drone data source supports annotations, which let you overlay Drone events, such as builds, onto your dashboard panels. Annotations mark points in time so you can correlate Drone activity with other metrics on your dashboards.
The data source doesn’t define a dedicated annotation query type, so annotations use the standard query actions described in the query editor.
Before you begin
- Configure the Drone data source.
- Understand Grafana annotations.
Add an annotation query
To add an annotation query that uses Drone data:
- Navigate to Dashboard settings > Annotations.
- Click Add annotation query.
- Select the Drone data source.
- Build a query with the query editor that returns the time-based events you want to mark, such as builds from a
Build Listquery. - Map the returned fields to the annotation time, text, and tags fields.
- Save the dashboard.
Grafana renders the returned events as annotation markers on panels that share the dashboard time range.
Map query results to annotation fields
Grafana maps the fields returned by your Drone query to annotation fields. A Build List query is the most useful source because it returns one row per build, each with started, finished, created, and updated timestamps, along with the build status and number.
Examples
The following examples use a Build List query to annotate build activity for a repository.
Annotate when builds start
To mark the moment each build started:
- Add an annotation query that uses a
Build Listquery for a repository. - Map
startedto the annotation Time field. - Map
statusto the annotation Text field so you can see the build outcome on hover.
Each build appears as a marker on panels that share the dashboard time range.
Annotate build duration as a region
To highlight the full span of each build instead of a single point:
- Add an annotation query that uses a
Build Listquery for a repository. - Map
startedto the annotation Time field. - Map
finishedto the annotation Time end field. - Map
statusto the annotation Tags field to color or filter regions by outcome.
Grafana renders each build as a shaded region from its start to its finish time, which makes it easy to correlate long-running builds with changes in your other metrics.


