Explore alternate URL formatting for embedded metrics charts
Summary
The format of embedded metrics urls are highly varied. Some of these can even be extremely long, including many query params. The format introduced in !28618 (merged) is an example of this.
We should investigate options to normalize the URL format across embeds, possibly implementing a URL-shortener to make these urls more user-friendly.
Examples of longer URLs, all of slightly different formats:
-
System dashboard embed:
https://gitlab.com/gitlab-org/monitor/tanuki-inc/-/environments/1118134/metrics?dashboard=config%2Fprometheus%2Fcommon_metrics.yml&group=System%20metrics%20(Kubernetes)&title=Memory%20Usage%20(Total)&y_label=Total%20Memory%20Used%20(GB)
-
Custom dashboard embed:
https://gitlab.com/gitlab-org/monitor/tanuki-inc/-/environments/1118134/metrics?dashboard=.gitlab%2Fdashboards%2Fanomalies.yml&group=Usage%20Variation&title=Memory%20Usage%20Rate%20Anomalies&y_label=Memory%20Usage%20Rate
-
Cluster health embed:
https://gitlab.com/gitlab-org/monitor/tanuki-inc/-/clusters/75523?tab=health&group=Cluster%20Health&title=CPU%20Usage&y_label=CPU%20(cores)
-
Manual prometheus alert embed:
https://20150.qa-tunnel.gitlab.info/root/manual-prometheus/-/environments/31/metrics_dashboard?embed_json=%7B%22panel_groups%22%3A%5B%7B%22panels%22%3A%5B%7B%22type%22%3A%22line-graph%22%2C%22title%22%3A%22Up+Status%22%2C%22y_label%22%3A%22Up+Status%22%2C%22metrics%22%3A%5B%7B%22query_range%22%3A%22up+%2A+0.5+%5Cu003c+1%22%7D%5D%7D%5D%7D%5D%7D&end=2020-04-01T21%3A07%3A29Z&start=2020-04-01T20%3A07%3A29Z