Skip to content

Commit c8d072d

Browse files
authored
[8.17] [Infra] Replace EuiErrorBoundary with KibanaErrorBoundary on the Infra Metrics (#226805) (#227053)
# Backport This will backport the following commits from `main` to `8.17`: - [[Infra] Replace EuiErrorBoundary with KibanaErrorBoundary on the Infra Metrics (#226805)](#226805) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"jennypavlova","email":"dzheni.pavlova@elastic.co"},"sourceCommit":{"committedDate":"2025-07-08T13:54:20Z","message":"[Infra] Replace EuiErrorBoundary with KibanaErrorBoundary on the Infra Metrics (#226805)\n\nPart of #225972 \n 3 of 5\n\n## Summary\n\nThis PR replaces EuiErrorBoundary with KibanaErrorBoundary on the Infra\nMetrics.\n\n## Testing\n\n- Introduce an error in the metrics page (maybe a typo, non-existent\ncomponent, or anything)\n- Open http://localhost:5601/ftw/app/metrics/\n- The error should be visible and it should still work as before (but\nalso including telemetry)\n-\n![image](https://github.com/user-attachments/assets/0fe1d2e0-ca98-40b5-862f-60b567b1e8a6)\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"c6e758cfc5afe395396409cf8b16baa024dc821b","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","backport:prev-major","Team:obs-ux-infra_services","v9.2.0"],"title":"[Infra] Replace EuiErrorBoundary with KibanaErrorBoundary on the Infra Metrics","number":226805,"url":"https://github.com/elastic/kibana/pull/226805","mergeCommit":{"message":"[Infra] Replace EuiErrorBoundary with KibanaErrorBoundary on the Infra Metrics (#226805)\n\nPart of #225972 \n 3 of 5\n\n## Summary\n\nThis PR replaces EuiErrorBoundary with KibanaErrorBoundary on the Infra\nMetrics.\n\n## Testing\n\n- Introduce an error in the metrics page (maybe a typo, non-existent\ncomponent, or anything)\n- Open http://localhost:5601/ftw/app/metrics/\n- The error should be visible and it should still work as before (but\nalso including telemetry)\n-\n![image](https://github.com/user-attachments/assets/0fe1d2e0-ca98-40b5-862f-60b567b1e8a6)\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"c6e758cfc5afe395396409cf8b16baa024dc821b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226805","number":226805,"mergeCommit":{"message":"[Infra] Replace EuiErrorBoundary with KibanaErrorBoundary on the Infra Metrics (#226805)\n\nPart of #225972 \n 3 of 5\n\n## Summary\n\nThis PR replaces EuiErrorBoundary with KibanaErrorBoundary on the Infra\nMetrics.\n\n## Testing\n\n- Introduce an error in the metrics page (maybe a typo, non-existent\ncomponent, or anything)\n- Open http://localhost:5601/ftw/app/metrics/\n- The error should be visible and it should still work as before (but\nalso including telemetry)\n-\n![image](https://github.com/user-attachments/assets/0fe1d2e0-ca98-40b5-862f-60b567b1e8a6)\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"c6e758cfc5afe395396409cf8b16baa024dc821b"}}]}] BACKPORT-->
1 parent b906496 commit c8d072d

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

x-pack/plugins/observability_solution/infra/public/pages/metrics/index.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ import { i18n } from '@kbn/i18n';
1010
import React, { useContext } from 'react';
1111
import { Routes, Route } from '@kbn/shared-ux-router';
1212

13-
import {
14-
EuiErrorBoundary,
15-
EuiHeaderLinks,
16-
EuiHeaderLink,
17-
EuiFlexGroup,
18-
EuiFlexItem,
19-
} from '@elastic/eui';
13+
import { EuiHeaderLinks, EuiHeaderLink, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
2014
import { useKibana, useUiSetting } from '@kbn/kibana-react-plugin/public';
2115
import { HeaderMenuPortal, useLinkProps } from '@kbn/observability-shared-plugin/public';
2216
import { enableInfrastructureHostsView } from '@kbn/observability-plugin/common';
@@ -26,6 +20,7 @@ import {
2620
OBSERVABILITY_ONBOARDING_LOCATOR,
2721
} from '@kbn/deeplinks-observability';
2822
import { dynamic } from '@kbn/shared-ux-utility';
23+
import { KibanaErrorBoundary } from '@kbn/shared-ux-error-boundary';
2924
import { HelpCenterContent } from '../../components/help_center_content';
3025
import { useReadOnlyBadge } from '../../hooks/use_readonly_badge';
3126
import { MetricsSettingsPage } from './settings';
@@ -76,7 +71,7 @@ export const InfrastructurePage = () => {
7671
});
7772

7873
return (
79-
<EuiErrorBoundary>
74+
<KibanaErrorBoundary>
8075
<ReactQueryProvider>
8176
<AlertPrefillProvider>
8277
<SearchSessionProvider>
@@ -149,7 +144,7 @@ export const InfrastructurePage = () => {
149144
</SearchSessionProvider>
150145
</AlertPrefillProvider>
151146
</ReactQueryProvider>
152-
</EuiErrorBoundary>
147+
</KibanaErrorBoundary>
153148
);
154149
};
155150

x-pack/plugins/observability_solution/infra/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@
118118
"@kbn/zod",
119119
"@kbn/observability-utils-server",
120120
"@kbn/observability-utils-common",
121-
"@kbn/core-test-helpers-model-versions"
121+
"@kbn/core-test-helpers-model-versions",
122+
"@kbn/shared-ux-error-boundary"
122123
],
123124
"exclude": ["target/**/*"]
124125
}

0 commit comments

Comments
 (0)