Annotations
Annotations allow you to enrich your metrics view with external data sources or context that isn't directly part of the primary model. This is often used to overlay events, holidays, or deployment markers onto your time series charts.
Requirements
The underlying table or model used for annotations must strictly follow this schema:
timecolumn (Required): Used to position the annotation on the time series chart.descriptioncolumn (Required): The text displayed when hovering over the annotation.time_endcolumn (Optional): Timestamp - If present, defines the end time for a range-based annotation.durationcolumn (Optional): String/Enum - If present, defines the granularity (e.g., 'day', 'hour', 'minute').selected dashboard time grain. It also forcestimeandtime_endin the UI to be truncated to the selected grain.
Configuring Annotations
To add an annotation, you need to define a reference to a table or model in your metrics view YAML.
annotations:
- model: annotations_auction
name: auction_annotations
measures: ['requests']
Configuration Properties
modelortable: Reference to the data source containing the annotation data.name: A unique identifier for the annotation set.measures(optional): A list of measures to display these annotations alongside. If not specified, the annotation will appear for all measures.
Visual Appearance
Annotations appear as markers or ranges on the time series charts in your dashboard.
- Point Annotations: Events with a single
timetimestamp appear as point markers. - Range Annotations: Events with both
timeandtime_endtimestamps appear as shaded regions spanning the duration. - Hover Details: Hovering over an annotation marker reveals the text from the
descriptioncolumn.
info
Refer to the annotations section in Metrics View YAML reference for more details on how to implement annotations.