Add ability to add annotations to metrics dashboard

Problem to solve

We currently do now allow users to add annotations to the charts in our metrics dashboards. This is a feature that is common in other charting tools.

Intended users

Further details

For example, on the Grafana Uptime Dashboard, there is a chart called "Overall SLA over time period - gitlab.com" where we currently cannot fully replicate because we do not have the ability to add annotations to the chart:

Screen_Shot_2020-02-04_at_9.12.27_AMScreen_Shot_2020-02-04_at_9.12.20_AM

Based on the Slack conversation with @marin

Whenever a feature flag is being toggled via our chatops, we query the Grafana API and add the annotations. https://gitlab.com/gitlab-com/chatops/-/blob/3a0b27165e0e2d4dd8c33e6bcd32dc670d72b452/lib/chatops/commands/feature.rb#L279-285 and https://gitlab.com/gitlab-com/chatops/-/blob/3a0b27165e0e2d4dd8c33e6bcd32dc670d72b452/lib/chatops/grafana/annotate.rb for details

Proposal

  1. Design issue for how the annotation would look like in the chart
  2. Backend issue where we should probably introduce the annotation property in the YAML definition
  3. Design issue for manually configure annotation on the chart (similar to Grafana)
  4. Design issue on how to toggle on/off
  5. Multiple annotations (Future)

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Links / references

Edited by Dov Hershkovitch