Skip to content

[Logs UX] Replace usages of EuiErrorBoundary#220060

Merged
mohamedhamed-ahmed merged 3 commits intoelastic:mainfrom
mohamedhamed-ahmed:211287-replace-usages-of-euierrorboundary
May 6, 2025
Merged

[Logs UX] Replace usages of EuiErrorBoundary#220060
mohamedhamed-ahmed merged 3 commits intoelastic:mainfrom
mohamedhamed-ahmed:211287-replace-usages-of-euierrorboundary

Conversation

@mohamedhamed-ahmed
Copy link
Contributor

@mohamedhamed-ahmed mohamedhamed-ahmed commented May 5, 2025

closes #211287

📝 Summary

This PR add aims to replace the EuiErrorBoundary with KibanaErrorBoundary but figured out that both can be completely removed as they are already wrapped in KibanaRenderContextProvider as per the image below.

Screenshot 2025-05-05 at 14 41 55

🔴 Before

Screenshot 2025-05-05 at 13 25 23

🟢 After

Screenshot 2025-05-05 at 13 25 00

@mohamedhamed-ahmed mohamedhamed-ahmed added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:obs-onboarding Observability Onboarding Team Project: Obs Quality labels May 5, 2025
@mohamedhamed-ahmed mohamedhamed-ahmed marked this pull request as ready for review May 5, 2025 12:39
@mohamedhamed-ahmed mohamedhamed-ahmed requested a review from a team as a code owner May 5, 2025 12:39
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

@mohamedhamed-ahmed
Copy link
Contributor Author

mohamedhamed-ahmed commented May 5, 2025

A couple of errors that I am not fully sure we want to catch as part of the KibanaErrorBoundary and publish EBT events for or just display a toast message for example, wdyt?

Anomalies

Log Entry Rate

Copy link
Contributor

@mykolaharmash mykolaharmash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the onboarding changes locally, everything works as expected. Thank you for the change 🙌

@mykolaharmash mykolaharmash requested a review from a team May 5, 2025 13:50
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
infra 1.1MB 1.1MB -105.0B
observabilityOnboarding 110.2KB 110.2KB -36.0B
total -141.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
observabilityOnboarding 11.5KB 11.4KB -77.0B

History

@mohamedhamed-ahmed mohamedhamed-ahmed merged commit 705fea6 into elastic:main May 6, 2025
9 checks passed
@awahab07
Copy link
Contributor

awahab07 commented May 6, 2025

A couple of errors that I am not fully sure we want to catch as part of the KibanaErrorBoundary and publish EBT events for or just display a toast message for example, wdyt?

Anomalies

Log Entry Rate

We shouldn't report them to telemetry if it's an expected flow (which seems it is). There's a related PR to audit log levels #218413 and a similar PR could be created, especially if the frequency of those errors is high.

@mohamedhamed-ahmed mohamedhamed-ahmed added backport:version Backport to applied version labels v8.19.0 and removed backport:skip This PR does not require backporting labels May 20, 2025
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15132035308

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15132035314

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request May 20, 2025
closes elastic#211287

## 📝  Summary

This PR add aims to replace the `EuiErrorBoundary` with
`KibanaErrorBoundary` but figured out that both can be completely
removed as they are already wrapped in `KibanaRenderContextProvider` as
per the image below.

<img width="857" alt="Screenshot 2025-05-05 at 14 41 55"
src="https://github.com/user-attachments/assets/9d8e908e-5df3-40bc-9b0d-f47b94de42ef"
/>

## 🔴 Before
<img width="1725" alt="Screenshot 2025-05-05 at 13 25 23"
src="https://github.com/user-attachments/assets/a474ce6f-2f43-4368-93d0-30191eb41816"
/>

## 🟢 After
<img width="1727" alt="Screenshot 2025-05-05 at 13 25 00"
src="https://github.com/user-attachments/assets/2c2ffbd8-af0d-45fd-9de7-0375a8835f17"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 705fea6)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request May 20, 2025
closes elastic#211287

## 📝  Summary

This PR add aims to replace the `EuiErrorBoundary` with
`KibanaErrorBoundary` but figured out that both can be completely
removed as they are already wrapped in `KibanaRenderContextProvider` as
per the image below.

<img width="857" alt="Screenshot 2025-05-05 at 14 41 55"
src="https://github.com/user-attachments/assets/9d8e908e-5df3-40bc-9b0d-f47b94de42ef"
/>

## 🔴 Before
<img width="1725" alt="Screenshot 2025-05-05 at 13 25 23"
src="https://github.com/user-attachments/assets/a474ce6f-2f43-4368-93d0-30191eb41816"
/>

## 🟢 After
<img width="1727" alt="Screenshot 2025-05-05 at 13 25 00"
src="https://github.com/user-attachments/assets/2c2ffbd8-af0d-45fd-9de7-0375a8835f17"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 705fea6)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request May 20, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [[Logs UX] Replace usages of EuiErrorBoundary
(#220060)](#220060)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"mohamedhamed-ahmed","email":"mohamed.ahmed@elastic.co"},"sourceCommit":{"committedDate":"2025-05-06T10:42:29Z","message":"[Logs
UX] Replace usages of EuiErrorBoundary (#220060)\n\ncloses
https://github.com/elastic/kibana/issues/211287\n\n## 📝 Summary\n\nThis
PR add aims to replace the `EuiErrorBoundary`
with\n`KibanaErrorBoundary` but figured out that both can be
completely\nremoved as they are already wrapped in
`KibanaRenderContextProvider` as\nper the image below.\n\n<img
width=\"857\" alt=\"Screenshot 2025-05-05 at 14 41
55\"\nsrc=\"https://github.com/user-attachments/assets/9d8e908e-5df3-40bc-9b0d-f47b94de42ef\"\n/>\n\n##
🔴 Before\n<img width=\"1725\" alt=\"Screenshot 2025-05-05 at 13 25
23\"\nsrc=\"https://github.com/user-attachments/assets/a474ce6f-2f43-4368-93d0-30191eb41816\"\n/>\n\n##
🟢 After\n<img width=\"1727\" alt=\"Screenshot 2025-05-05 at 13 25
00\"\nsrc=\"https://github.com/user-attachments/assets/2c2ffbd8-af0d-45fd-9de7-0375a8835f17\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"705fea6bd0efd6f25e1d151cdfb547c08bedc591","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-logs","backport:version","v9.1.0","v8.19.0","Project:
Obs Quality"],"title":"[Logs UX] Replace usages of
EuiErrorBoundary","number":220060,"url":"https://github.com/elastic/kibana/pull/220060","mergeCommit":{"message":"[Logs
UX] Replace usages of EuiErrorBoundary (#220060)\n\ncloses
https://github.com/elastic/kibana/issues/211287\n\n## 📝 Summary\n\nThis
PR add aims to replace the `EuiErrorBoundary`
with\n`KibanaErrorBoundary` but figured out that both can be
completely\nremoved as they are already wrapped in
`KibanaRenderContextProvider` as\nper the image below.\n\n<img
width=\"857\" alt=\"Screenshot 2025-05-05 at 14 41
55\"\nsrc=\"https://github.com/user-attachments/assets/9d8e908e-5df3-40bc-9b0d-f47b94de42ef\"\n/>\n\n##
🔴 Before\n<img width=\"1725\" alt=\"Screenshot 2025-05-05 at 13 25
23\"\nsrc=\"https://github.com/user-attachments/assets/a474ce6f-2f43-4368-93d0-30191eb41816\"\n/>\n\n##
🟢 After\n<img width=\"1727\" alt=\"Screenshot 2025-05-05 at 13 25
00\"\nsrc=\"https://github.com/user-attachments/assets/2c2ffbd8-af0d-45fd-9de7-0375a8835f17\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"705fea6bd0efd6f25e1d151cdfb547c08bedc591"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/220060","number":220060,"mergeCommit":{"message":"[Logs
UX] Replace usages of EuiErrorBoundary (#220060)\n\ncloses
https://github.com/elastic/kibana/issues/211287\n\n## 📝 Summary\n\nThis
PR add aims to replace the `EuiErrorBoundary`
with\n`KibanaErrorBoundary` but figured out that both can be
completely\nremoved as they are already wrapped in
`KibanaRenderContextProvider` as\nper the image below.\n\n<img
width=\"857\" alt=\"Screenshot 2025-05-05 at 14 41
55\"\nsrc=\"https://github.com/user-attachments/assets/9d8e908e-5df3-40bc-9b0d-f47b94de42ef\"\n/>\n\n##
🔴 Before\n<img width=\"1725\" alt=\"Screenshot 2025-05-05 at 13 25
23\"\nsrc=\"https://github.com/user-attachments/assets/a474ce6f-2f43-4368-93d0-30191eb41816\"\n/>\n\n##
🟢 After\n<img width=\"1727\" alt=\"Screenshot 2025-05-05 at 13 25
00\"\nsrc=\"https://github.com/user-attachments/assets/2c2ffbd8-af0d-45fd-9de7-0375a8835f17\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"705fea6bd0efd6f25e1d151cdfb547c08bedc591"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: mohamedhamed-ahmed <mohamed.ahmed@elastic.co>
@JasonStoltz
Copy link
Member

@mohamedhamed-ahmed Where is the guidance regarding KibanaRenderContextProvider located? I'd like to highlight that in the EUI docs.

@mohamedhamed-ahmed
Copy link
Contributor Author

mohamedhamed-ahmed commented May 20, 2025

@JasonStoltz let me share a document with you that has all needed information.

akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
closes elastic#211287

## 📝  Summary

This PR add aims to replace the `EuiErrorBoundary` with
`KibanaErrorBoundary` but figured out that both can be completely
removed as they are already wrapped in `KibanaRenderContextProvider` as
per the image below.

<img width="857" alt="Screenshot 2025-05-05 at 14 41 55"
src="https://github.com/user-attachments/assets/9d8e908e-5df3-40bc-9b0d-f47b94de42ef"
/>

## 🔴 Before
<img width="1725" alt="Screenshot 2025-05-05 at 13 25 23"
src="https://github.com/user-attachments/assets/a474ce6f-2f43-4368-93d0-30191eb41816"
/>

## 🟢 After
<img width="1727" alt="Screenshot 2025-05-05 at 13 25 00"
src="https://github.com/user-attachments/assets/2c2ffbd8-af0d-45fd-9de7-0375a8835f17"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
qn895 pushed a commit to qn895/kibana that referenced this pull request Jun 3, 2025
closes elastic#211287

## 📝  Summary

This PR add aims to replace the `EuiErrorBoundary` with
`KibanaErrorBoundary` but figured out that both can be completely
removed as they are already wrapped in `KibanaRenderContextProvider` as
per the image below.

<img width="857" alt="Screenshot 2025-05-05 at 14 41 55"
src="https://github.com/user-attachments/assets/9d8e908e-5df3-40bc-9b0d-f47b94de42ef"
/>

## 🔴 Before
<img width="1725" alt="Screenshot 2025-05-05 at 13 25 23"
src="https://github.com/user-attachments/assets/a474ce6f-2f43-4368-93d0-30191eb41816"
/>

## 🟢 After
<img width="1727" alt="Screenshot 2025-05-05 at 13 25 00"
src="https://github.com/user-attachments/assets/2c2ffbd8-af0d-45fd-9de7-0375a8835f17"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Project: Obs Quality release_note:skip Skip the PR/issue when compiling release notes Team:obs-onboarding Observability Onboarding Team v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Logs UX] Replace usages of EuiErrorBoundary

6 participants