grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
64.07k stars 12k forks source link

Retain context when jumping from exemplar in dashboard to trace #82762

Open gelicia opened 7 months ago

gelicia commented 7 months ago

Discussed in https://github.com/grafana/grafana/discussions/65310

Originally posted by **09jvilla** March 23, 2023 One user has brought up that they lose context when jumping from a dashboard panel with exemplars into the trace pointed to by that exemplar. The way the interaction works today is that the user hovers over the dot representing the exemplar, which opens a modal. From there, they click the "query in tempo" button, which takes them directly to an explore view that displays the trace. This means that they lose the context of the dashboard and metric panel they were previously looking at. They can only get that context back by hitting the back button in their browser. Alternative they can open a new tab from "query in tempo" and then flip between tabs, but they also feel this causes them to lose context. Their suggestion to help maintain context is to change the interaction so that "query in tempo" splits the screen between the dashboard on one side and the trace view on the other. This is similar to the interaction today in Explore. However, its not clear to me that this proposed interaction is a pattern that is used anywhere else in dashboards, which means it might feel jarring for others. One alternative to consider could also be having the "query in tempo" button in a dashboard open a split screen view in the Explore, with the metric on one side and the trace on the other (instead of going to an Explore view with just the trace). (Below) Current exemplar dashboard interaction that causes the user to lose context: https://user-images.githubusercontent.com/9610816/227397584-32f3902c-403d-4912-9620-9f714d6938cc.mp4 (Below) Exemplar explore interaction which allows the user to retain context via split screen interaction https://user-images.githubusercontent.com/9610816/227397640-69c4e636-7ae8-49e6-8f26-d416a18f81c3.mp4
joey-grafana commented 7 months ago

There seems to be at least two approaches here:

  1. Is there an easy way to do this while building the exemplar query in such a way that when clicking on the exemplar in a dashboard that we open a split view instead in explore with the exemplar on the left and the trace on the right? cc @grafana/observability-metrics
  2. If / when dashboards move more towards being used with the scenes architecture, you could open a drawer when the exemplar is clicked. This may be a while off as it will take time x effort to move dashboards to scenes.