Skip to content

Embed specific metrics chart in issue

Problem to solve

When solving an incident a user will want to associate specific metrics that describe the problem with the active incident. This could be an out-of-the-box metrics (CPU, memory. etc) or a custom one they created. This solves the the following problems:

  • Multiple users are solving an incident and need to share pertinent information in single place
  • Users want to review an incident historically to figure out what went wrong and how to fix it

Intended users

Sasha the Software Developer
Devon the DevOps Engineer
Sidney the Systems Administrator

Further details

This work supports the Incident Management Vision

Original Proposal

  1. User pastes URL link generated from a specific chart on the metrics dashboard (#63199 (closed)) in the description of an issue. Link looks something like this: https://<host>/<project>/environments/<env_id>/metrics?dashboard_path=value&panel_group_title=value2&chart_title=value3
  2. The chart unfurls when the User clicks Preview or Save Changes. The FE "unfurls" the chart by fetching a dashboard from https://<host>/<project>/environments/<env_id>/metrics_dashboard?embedded=true&dashboard_path=value&panel_group_title=value2&chart_title=value3 (provided by BE to FE - users wouldn't see this URL at all)
  3. A link back to the metrics dashboard anchored to the specific metric chart appears near unfurled chart. We still need to figure out what this looks like. There are two options:
    • MVC - Chart's unfurl directly under the pasted URL. If there are multiple, they unfurl vertically in order, going link - chart -link - chart...and so on
    • Create tiles that contain the visualization AND the chart link as a distinct clickable area in the tile. If there are multiple, the tiles arrange first horizontally and then vertically ordering left to right
  4. Ideally the link appears linked text perhaps it could say Click here for the full metrics dashboard.
  5. Clicking the original link in the issue description would send you to the normal metrics dashboard, resolving any of the url options that it supports (in this case, the dashboard_path option), so we'd end up on the correct dashboard!

Updated MVC Proposal (based on discussions below)

  1. User pastes URL link generated from a specific chart on the metrics dashboard (#63199 (closed)) in the description of an issue.
  2. If the link works, the chart unfurls. If it doesn't, only the URL is displayed. How this breaks down:
State What to show
Metrics link is correct and metrics are still in range Show URL and unfurl chart
Any other case Show URL only. Clicking URL would result in a 404
  1. A link back to the metrics dashboard anchored to the specific metric chart appears near unfurled chart. If the user adds multiple links, the placement of the unfurled charts would be dependent on whether the links added are in the same paragraph or not.

Links in the same paragraph

Screen_Shot_2019-07-25_at_10.24.24_AM

Links in different paragraphs

Screen_Shot_2019-07-25_at_10.24.43_AM

  1. Clicking the original link in the issue description would send you to the normal metrics dashboard, resolving any of the url options that it supports

Permissions and Security

Documentation

Testing

What does success look like, and how can we measure that?

Links / references

Edited by Amelia Bauerly