Hide embedded metrics when removal flag is true
What does this MR do and why?
Describe in detail what your merge request does and why.
We are removing the Monitor Metrics and modules connected to it. This MR hides embedded metrics in flavoured markdown, when Metrics removal feature flag is set to true
.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
before | after |
---|---|
How to set up and validate locally
This setup is quite involved, so feel free to ping @tristan.read for a screen-share, or use the screenshots instead of testing manually.
Pre-requisites: Docker.
Create mock prometheus metrics:
- Check out https://gitlab.com/seanarnold/local-prometheus-metrics locally.
- Navigate to the local repo from step 1 and run
docker-compose up
. - Note the prometheus URL (by default
http://localhost:9090
). - Generate some data by navigating to the mock webserver a few times:
http://localhost:8080/flakey
Connect prometheus to the GDK:
- Navigate to a project in the GDK.
- Navigate to Settings > Integrations > Prometheus.
- Input the prometheus URL from earlier and select 'Active'.
- Test and confirm a successful connection. Save the form.
Add an environment:
- Navigate to Deployments -> Environments (or Build -> Environments if the new sidebar is enabled).
- Select 'New environment' and create an environment called
production
.
Create the embed:
- Navigate to the metrics dashboard: Monitor -> Metrics.
- Scroll down to Response metrics (NGINX).
- Open the top-right menu of a chart and choose 'Copy link to Chart'
- Create a new issue and paste the copied embed link in the description. Save the issue.
You should see an embedded chart appear.
To test with the feature flag:
- Type this into terminal:
rails c Feature.enable(:remove_monitor_metrics)
- Refresh the issue.
You should no longer see an embedded chart.
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.
Related to #399231 (closed)