Load dashboards from project's git repository
Problem to solve
We would like to eventually store our dashboards in the git repo to make them easier to collaborate on, as well as version control: &1104
We would also like to support multiple dashboards: https://gitlab.com/gitlab-org/gitlab-ee/issues/6019
Further, we know we'd like to allow users to control a wide variety of options, such as:
- Specific chart settings
- Additional chart types (heatmap, etc.)
- Arrangement of charts
- and more.
Building UI to manage all of these features is achievable, but will take time. We need to identify a way to accelerate the usability of these features to our users.
Intended users
Further details
Proposal
We should build a small primitive, the basic support for keeping dashboards in source control. By doing this, we can allow users to edit some lightweight YAML, and achieve a wide set of functionality that would otherwise take multiple releases to enable if we had to build it all in the UI.
We do still plan to build the UI to enable these features, however this sequencing has important benefits:
- Users are able to leverage these features much earlier than they otherwise would have been able to, delivering value more quickly as well as enabling feedback.
- We start off building these features on top of the foundation of a source controlled YAML file. This way we don't have to try to bolt this on later.
It is important to note that we would still have our automatically generated dashboard present and usable, which would be available out of the box with no configuration. This feautre would supplement that functionality and enable users to define their own dashboards.
To achieve this, we should:
- We support reading dashboard YML files from
.gitlab/dashboards
.- Note this also allows for additional extensibility by other teams, if we align on a panel type interface for a common dashboarding system. (https://gitlab.com/gitlab-org/gitlab-ce/issues/27111)
- One YML file defines a single dashboard.
- A dropdown is then shown on the UI, to let you select which dashboard you want to see, as shown in: https://gitlab.com/gitlab-org/gitlab-ee/issues/6019#note_154415056
A couple of minor questions to answer:
- How do you control which is the default dashboard?
- For the first iteration, continue to use the automatically generated dashboard?
- How do we handle the default automatically detected dashboard?
- Special case it and give it its own reserved name.
- How do we handle adding custom metrics
- These should only be added to the default dashboard, for now.
Out of Scope
The configuring of alerts as part of the dashboard yaml definition is not in scope for this issue.