Tempo / Trace Viewer: Implements deep linking to spans #44017
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@aocenas New PR from my personal fork. Go to town! 😄
What this PR does / why we need it:
Use cases are outlined in #40720.
This PR is doing a lot, so here's a roadmap to explain at a high level what types of changes you are looking at within each grouping of files. I'm also adding some comments in code to assist in navigating.
packages/grafana-data/src/types/...
Adds the concept of ExplorePanelsState, which allows us to encode the state of explore view panels into the url.packages/grafana-data/src/utils/...
Serializes ExplorePanelsState into explore url and adds it to internal links.public/app/core/utils/explore.ts
Deserializes ExplorePanelsState from explore urlpackages/jaeger-ui-components/...
The UI work to add "focused span" behavior to the trace viewer. Adds the concept of focusedSpanId to the trace viewer components, scrolls the focused span into view and highlights it with a blue background. Knows nothing about URL, explore pane state, etc. Adds the concept of createFocusSpanLink, a function that takes a traceId & spanId and returns a LinkModel representing a deep link to the trace & span.public/app/features/explore/state/...
Wire up ExplorePanelsState to redux, keeps it in sync with the url, wires it up to SplitOpen.public/app/features/explore/...
Glues together ExplorePanelsState from redux to the Explore UI to the focusedSpanId and createFocusSpanLink features of the trace viewer.