Draft: Observability dashboard render
What does this MR do and why?
POC for using Dashboarding for Rendering Observability Data. gitlab-org/opstrace/opstrace#2123 (closed)
- Creates a new data source for connecting to promotheus data
- Test dashboard + test visualization for a PromQL Query
- First attempt for a PromQL Editor
Possible PromQL extension for autocompletion
- https://github.com/prometheus-community/monaco-promql (We use already monaco)
- https://github.com/prometheus/codemirror-promql (Has also API Based auto complete suggestions)
Screenshots or screen recordings
Walkthrough - https://www.youtube.com/watch?v=STtFWAFHR-s
How to set up and validate locally
Just for the demo and should/can be replaced with the Rails Proxy
- CORS Proxy to add proxy headers of Grafana as it doesn't support CORS so I can call it directly from the FE
- I used https://github.com/Rob--W/cors-anywhere to run on
http://localhost:3005/
(but you can also use NGINX or anything else right now) - Which gave me then the capability to call this funky URL
http://localhost:3005/http://localhost:3001/api/datasources/proxy/1/api/v1/query_range
directly which is simply the Grafana API endpoint - Added a Grafana API token which i then sent in !114751 (diffs)
- Add the token from Grafana to !114751 (diffs)
Actual setup steps for this MR
- Have GOUI running on http://localhost:3001/ and connect to Promotheus (I used https://prometheus.demo.do.prometheus.io/) as datasoruce 1 (this is basically hardcoded)
- Enable the feature flag by running the following command in your GitLab directory which should enable analytics :
echo "Feature.enable(:combined_analytics_dashboards)" | rails c
- Navigate to the Dashboard page for a project for example
http://localhost:3000/Commit451/lab-coat/-/analytics/dashboards
which then should show you aTest Rendering Observability Data
dashboard
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Tim Zallmann