[8.19] [Discover][APM] Add link to view related errors in Discover from the full-screen waterfall (#224033)#224422
Merged
iblancof merged 2 commits intoelastic:8.19from Jun 18, 2025
Merged
Conversation
…full-screen waterfall (elastic#224033) ## Summary Closes elastic#222591 This PR adds the link to the “View related error” / "View X related errors" badge in the full-screen waterfall. Unlike the same badge in APM, here it’s handled as a native `href`, so the user keeps the option to open it in a new tab—avoiding loss of context from Discover if they prefer. **Highlights** * Created `ApmErrorsContextService` to access the configured APM error indices. * I had considered merging this with `TracesContextService` into a shared `ApmContextService` (for both traces and errors), but decided to keep them separate to avoid mixing methods and logic. Totally open to revisit this if anyone feels that a shared service would make things cleaner or more maintainable. * Created `DataSourcesProvider` to easily access the relevant indices within our flyouts. * Built the Discover URL using the locator, preparing an ESQL query to filter by `span.id` and `trace.id` across both error and log indices. * Added `getRelatedErrorsHref` as a prop to `TraceWaterfallEmbeddable`, allowing us to pass the errors URL directly. * Why this approach instead of triggering a callback to the parent? We wanted to preserve native link behavior (e.g., open in new tab), which wouldn't work if navigation was handled via `navigateTo` from the parent. * Created `EmbeddableRelatedErrors` to handle the badge link. * Agreed with the EUI team to cast the `href` as `any`, since due to the component nesting in the waterfall, it was the cleanest way to make the native link behavior work in this context. * Created `ExitFullScreenButton` wrapper to enable exiting full-screen mode with the `ESC` key. https://github.com/user-attachments/assets/d3e476ae-ee10-410f-b003-02521dc35e13 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com> Co-authored-by: Milosz Marcinkowski <38698566+miloszmarcinkowski@users.noreply.github.com> (cherry picked from commit 87cb768) # Conflicts: # x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx
Contributor
|
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
rmyz
approved these changes
Jun 18, 2025
Contributor
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Historycc @iblancof |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport
This will backport the following commits from
mainto8.19:Questions ?
Please refer to the Backport tool documentation