Google Cloud Monitoring annotations
Annotations overlay rich event information on top of graphs. You can use annotations to mark important events, deployments, or incidents on your dashboards.
Before you begin
Before you configure annotations, ensure you have the following:
- A configured Google Cloud Monitoring data source.
- A dashboard where you want to add annotations.
Annotation limitations
Keep the following limitations in mind when using annotations:
- Performance: Rendering annotations is expensive. Limit the number of rows returned to maintain dashboard performance.
- Native events: There’s no support for displaying Google Cloud Monitoring’s native annotations and events. However, annotations work well with custom metrics in Google Cloud Monitoring.
Add an annotation query
To add an annotation query to a dashboard:
- Open the dashboard where you want to add annotations.
- Click Dashboard settings (gear icon).
- Select Annotations in the left menu.
- Click Add annotation query.
- Select your Google Cloud Monitoring data source.
- Configure the annotation query using the query editor.
Configure the annotation query
With the query editor for annotations, you can select a metric and filters to define which data points create annotations.
The Title and Text fields support templating and can use data returned from the query.
For example, the Title field could have the following text:
{{metric.type}} has value: {{metric.value}}
Example result: monitoring.googleapis.com/uptime_check/http_status has this value: 502
Annotation patterns
Use the following patterns in the Title and Text fields to display metric data in your annotations:
Example: Annotate uptime check failures
To create annotations for uptime check failures:
- Add an annotation query using the Google Cloud Monitoring data source.
- Select the
monitoring.googleapis.com/uptime_check/check_passedmetric. - Add a filter for
check_passed = false. - Set the Title to:
Uptime check failed: {{metric.label.check_id}} - Set the Text to:
Region: {{resource.label.zone}}
This creates an annotation marker on your graph each time an uptime check fails.



