Annotations allow you to indicate significant events such as deployments, incidents, or configuration changes on a timeseries chart. This helps you correlate metric behavior with what happened in your environment when troubleshooting or reviewing trends.

Annotations are data-driven, so they stay current as your data changes. You can create an annotation in two ways:
When you apply an annotation to a chart, the result of the DQL or code are mapped to the chart so you can see what happened and when it happened.
The Annotations panel is your starting point for all annotations-related activities on a dashboard.
To list all annotations
Select (Settings) in the upper-right corner of a dashboard to display the dashboard Settings panel.
Select Annotations.
Optional: Turn on Display global selector on dashboard to display the Annotations controls on your dashboard.

When annotations are defined for your dashboard, you can use them to look for correlations between metric behavior on your timeseries charts and significant events such as deployments, incidents, or configuration changes.
Use the global selector for interactive control of your annotations. This can be useful when, for example, you're troubleshooting an issue and you want to see only problem annotations on your charts. In this case, you could select your problems annotation and hide your other annotations.
The global selector is a section of controls labeled Annotations that you can display in the upper-left corner of the dashboard, directly under the dashboard name.
The global selector has two menus:
The menu gives you quick access to common annotation actions.

This menu shows you how many annotations are currently applied to the dashboard. Open the menu to see exactly which annotations are currently applied to your dashboard.

To add an annotation to a dashboard
Go to the Annotations panel.
Select Create annotation.
Define the annotation:

See below for details on each part.d.
In the Data section, choose whether to use DQL or code for your annotation.
Select DQL or Code.
Enter a DQL query or code snippet.
To get you started, you can use any of the buttons under the edit box (such as Open alerts for DQL, or Sample code for code) to automatically add example DQL or code here.
Select Run to fetch preview data.
If the query or code is valid and the returned results include at least one timestamp and one string field (for label or description), fields are automatically mapped and are populated in the Data mapping section.
If automatic data mapping fails, error and validation messages will guide you.
If the query or code is not valid, you get error messages as for tiles or variables. Correct your query or code and retry.
If the query or code result doesn’t contain a timestamp, you get an error message in the Data mapping section. Select an appropriate field to map a timestamp to your annotation.

The Data mapping section maps the annotation data, specifying what you want to see and where you want to see it.
This mapping is created automatically in the previous step, but you can adjust it manually as needed.
| Field | Required? | Description | Preferred DQL field | Expected type |
|---|---|---|---|---|
| Required | The text shown on the chart (or the primary label for the annotation). |
|
|
| Optional | The text shown in the tooltip when hovering the annotation. |
|
|
| Required | The timestamp used for the annotation start/anchor. |
|
|
| Optional | An optional timestamp to create a time range (bar or area) instead of a single instant. |
|
|
The automatic mapping is based on the following steps:
binary, geo_point, smartscape_id) to any, and assigns any when a field has multiple types across type mappings.event.name, event.description, event.start, event.end) with matching types. Any match is used directly.string field is mapped to nametimestamp field is mapped to startstring field is mapped to descriptiontimestamp field is mapped to end
Fields already assigned in the preferred pass are skipped.The Display settings section determines how the annotations appear on the chart.
*) displays the annotation on all tiles with a supported visualization type.To edit an annotation
Go to the Annotations panel.
Select the annotation you want to edit.
Alternative: open the menu for the annotation you want to edit and select Edit.
Edit the annotation as needed. Configuration options are described in the Add an annotation section. For instance, edit the name displayed at the top of the annotation details panel.
To duplicate an annotation
Go to the Annotations panel.
Open the menu for the annotation you want to duplicate and select Duplicate.
Alternative: select the annotation to display the annotation details, open the menu next to the annotation name, and then select Duplicate.
Edit the duplicate annotation as needed. Configuration options are described in the Add an annotation section.
To delete an annotation
Go to the Annotations panel.
Open the menu for the annotation you want to delete and select Delete.
Alternative: select the annotation to display the annotation details, open the menu next to the annotation name, and then select Delete.
The order of annotations on the list defines which goes first (higher means also visually higher on the same track).
To change the order of annotations on your dashboard
Go to the Annotations panel.
Drag the annotations into the order you want.
Alternative: open the menu for the annotation you want to move and select Move up or Move down.
To create annotations for alerts
Start with a dashboard that has at least one timeseries chart.
timeseries { avg(dt.host.cpu.usage), value.A = avg(dt.host.cpu.usage, scalar: true) }, by: { dt.smartscape.host }| fieldsAdd dt.smartscape.host.name = getNodeName(dt.smartscape.host)| limit 10
Select (Settings) in the upper-right corner of a dashboard to display the dashboard Settings panel, and then select Annotations.
Select Create annotation.
At the top of the annotation edit panel, name the annotation (for example, Alerts).
In the Data section, select DQL.
In the DQL edit box, paste the following DQL query to fetch active alerts.
fetch dt.davis.events| filter event.status == "ACTIVE"// Optional: filter by specific anomaly detector//| filter dt.settings.object_id == "..."| fieldsevent.start,event.end,event.id,event.name,event.description,event.status,event.type,affected_entity_ids| sort event.start desc
Select Run to fetch preview data. Fields are automatically mapped as displayed in the Data mapping section. In this example, you should get:
event.name (String)event.description (String)event.start (Timestamp)In the Display settings section, adjust display settings as needed.
Review the results on your charts.
In this example, an annotation is pinned above our line chart at 1:37 PM to indicate that an alert (HTTP monitor global outage) was issued at that time. For details, hover over the annotation above the chart. The annotation line drawn on the chart is controlled by the Pin indicator setting.

To create annotations for custom events
Start with a dashboard that has at least one timeseries chart.
timeseries { avg(dt.host.cpu.usage), value.A = avg(dt.host.cpu.usage, scalar: true) }, by: { dt.smartscape.host }| fieldsAdd dt.smartscape.host.name = getNodeName(dt.smartscape.host)| limit 10
Select (Settings) in the upper-right corner of a dashboard to display the dashboard Settings panel, and then select Annotations.
Select Create annotation.
At the top of the annotation edit panel, name the annotation (for example, Custom events).
In the Data section, select DQL.
In the DQL edit box, paste the following DQL query to fetch events.
fetch events| filter event.type == "CUSTOM_INFO"//| filter contains(event.description,"deploy")| fieldsAdd event.description = coalesce(event.description,concat("[", event.provider, "] ",event.name,if(isNotNull(dt.entity.process_group_instance.name), then:concat(" | PGI: ", dt.entity.process_group_instance.name), else:""),if(isNotNull(dt.entity.environment.name), then:concat(" | Env: ", dt.entity.environment.name), else:""),if(isNotNull(Environment), then:concat(" | Environment: ", Environment), else:""),if(isNotNull(Service), then:concat(" | Service: ", Service), else:""),if(isNotNull(appId), then:concat(" | App: ", appId), else:""),if(isNotNull(Version), then:concat(" | Version: ", Version), else:""),if(isNotNull(Tenant), then:concat(" | Tenant: ", Tenant), else:""),if(isNotNull(Channel-Name), then:concat(" | Channel: ", Channel-Name), else:""),if(isNotNull(Compatibility), then:concat(" | Compatibility: ", Compatibility), else:""),if(isNotNull(user), then:concat(" | User: ", user), else:"")))| fieldstimestamp,event.start,event.end,event.name,event.description,event.status,event.status_transition,event.provider,dt.davis.impact_level,dt.davis.mute.status,dt.source_entity,dt.source_entity.type,dt.entity.process_group_instance.name,dt.entity.environment.name,Environment,Service,appId,appVersion,Version,Tenant,Channel-Name,Channel-Type,App-Id,Compatibility,user,affected_entity_ids,affected_entity_types,entity_tags,maintenance.is_under_maintenance,dt.event.correlation_id| sort timestamp desc| limit 20
Select Run to fetch preview data. Fields are automatically mapped as displayed in the Data mapping section. In this example, you should get:
event.name (String)event.description (String)event.start (Timestamp)event.end (Timestamp)In the Display settings section, adjust display settings as needed.
Review the results on your charts.
To create annotations for problems
Start with a dashboard that has at least one timeseries chart.
timeseries { avg(dt.host.cpu.usage), value.A = avg(dt.host.cpu.usage, scalar: true) }, by: { dt.smartscape.host }| fieldsAdd dt.smartscape.host.name = getNodeName(dt.smartscape.host)| limit 10
Select (Settings) in the upper-right corner of a dashboard to display the dashboard Settings panel, and then select Annotations.
Select Create annotation.
At the top of the annotation edit panel, name the annotation (for example, Problems).
In the Data section, select DQL.
In the DQL edit box, paste the following DQL query to fetch problems.
fetch dt.davis.events| filter event.status == "ACTIVE"// Optional: filter by specific anomaly detector//| filter dt.settings.object_id == "..."| fieldsevent.start,event.end,event.id,event.name,event.description,event.status,event.type,affected_entity_ids| sort event.start desc
Select Run to fetch preview data. Fields are automatically mapped as displayed in the Data mapping section. In this example, you should get:
event.name (String)event.description (String)event.start (Timestamp)In the Display settings section, adjust display settings as needed.
Review the results on your charts.
Because annotations are powered by DQL, you can use virtually any data accessible through DQL as an annotation source, including logs, metrics, events, business events, spans, and more.
Here are some common examples:
dt.davis.events as shown in Example 1: Alertsevents as shown in Example 2: Custom eventsdt.davis.events as shown in Example 3: Problems.Annotations use the global dashboard timeframe. Tile-specific custom timeframes aren't used.
This is by design. Fetching annotation data for every unique tile timeframe would multiply the number of queries, increasing cost and processing time—especially on dashboards with many different tile timeframes.
Note: If a tile has a custom timeframe or you've panned within a tile, annotations outside that visible range won't appear.
Annotations use the globally set segments. Tile-specific custom segments aren't used.
As with timeframes, fetching annotation data for every unique combination of tile-level segments would significantly increase the number of queries executed.
If your annotation isn't visible, check the following:
An annotation requires at least a name and a timestamp field. Adjust your query to include both. For details, see the Data mapping section.