diff --git a/public/app/plugins/datasource/stackdriver/partials/annotations.editor.html b/public/app/plugins/datasource/stackdriver/partials/annotations.editor.html
index 592dffacd51..0c2ce32f894 100644
--- a/public/app/plugins/datasource/stackdriver/partials/annotations.editor.html
+++ b/public/app/plugins/datasource/stackdriver/partials/annotations.editor.html
@@ -1,7 +1,7 @@
+Annotation Query Format
+An annotation is an event that is overlaid on top of graphs. Annotation rendering is expensive so it is important to limit the number of rows returned. + +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+ + +{{metric.value}}= value of the metric/point +{{metric.type}}= metric type e.g. compute.googleapis.com/instance/cpu/usage_time +{{metric.name}}= name part of metric e.g. instance/cpu/usage_time +{{metric.service}}= service part of metric e.g. compute + +{{metric.label.label_name}}= Metric label metadata e.g. metric.label.instance_name +{{resource.label.label_name}}= Resource label metadata e.g. resource.label.zone +
{{ctrl.lastQueryMeta.rawQueryString}}
Alias Patterns
- Format the legend keys any way you want by using alias patterns. +++ +Alias Patterns
Format the legend keys any way you want by using alias patterns. - Example:{{metric.name}} - {{metric.label.instance_name}}- Result: cpu/usage_time - server1-europe-west-1 +{{metric.name}} - {{metric.label.instance_name}}- Patterns: -{{metric.type}}= metric type e.g. compute.googleapis.com/instance/cpu/usage_time -{{metric.name}}= name part of metric e.g. instance/cpu/usage_time -{{metric.service}}= service part of metric e.g. compute +cpu/usage_time - server1-europe-west-1-{{metric.label.label_name}}= Metric label metadata e.g. metric.label.instance_name -{{resource.label.label_name}}= Resource label metadata e.g. resource.label.zone -{{metric.type}}= metric type e.g. compute.googleapis.com/instance/cpu/usage_time +{{metric.name}}= name part of metric e.g. instance/cpu/usage_time +{{metric.service}}= service part of metric e.g. compute + +{{metric.label.label_name}}= Metric label metadata e.g. metric.label.instance_name +{{resource.label.label_name}}= Resource label metadata e.g. resource.label.zone +{{ctrl.lastQueryError}}diff --git a/public/sass/components/_infobox.scss b/public/sass/components/_infobox.scss index 9a6a2e78a4f..52be4b4737c 100644 --- a/public/sass/components/_infobox.scss +++ b/public/sass/components/_infobox.scss @@ -19,6 +19,15 @@ padding-left: $spacer * 1.5; } + code { + @include font-family-monospace(); + font-size: $font-size-base - 2; + background-color: $code-tag-bg; + color: $text-color; + border: 1px solid $code-tag-border; + border-radius: 4px; + } + a { @extend .external-link; }