Multi metrics panels don't display correctly when embedded
Summary
Multi metric panels don't display together on a single chart when embedded in Gitlab Flavored Markdown. Instead they display as separate charts.
Steps to reproduce
Prerequisites:
- A gitlab-managed cluster connected to a project.
- Prometheus installed on the cluster.
- A deployed environment running on the cluster.
Reproduction:
- Navigate to the prometheus integration settings page (e.g. https://gitlab.com/gitlab-org/monitor/tanuki-inc/-/services/prometheus/edit)
- Add a metric.
- Add another metric, making sure to use the same Title, Group and Y-axis Label as the previous step.
- Navigate to the metrics dashboard (e.g.
https://gitlab.com/gitlab-org/monitor/tanuki-inc/-/environments/1118134/metrics
) - Select the 'Copy link to chart' from the dropdown next to the chart for the metric added in the previous step.
- Create a new issue, pasting in the link from the previous step.
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
Multiple charts are embedded, one for each metric.
What is the expected correct behavior?
The embed displays all metrics together on the same chart.
Relevant logs and/or screenshots
Config 1 | Config 2 | Config 3 | Result |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)