mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
## Summary Part of https://github.com/elastic/kibana-team/issues/646 Depends on https://github.com/elastic/kibana/pull/169324 Implements telemetry for fatal errors caught by KibanaErrorBoundary in: - `packages/core/application/core-application-browser-internal/src/ui/app_router.tsx` - `packages/kbn-shared-ux-utility/src/with_suspense.tsx` [*] - `packages/react/kibana_context/render/render_provider.tsx` [*] - `src/plugins/management/public/components/management_app/management_router.tsx` - `x-pack/plugins/observability_shared/public/components/page_template/page_template.tsx` - `x-pack/plugins/security_solution/public/app/app.tsx` [*] The changes made to these allowed the `analytics` dependency to be provided optionally, to avoid a breaking API change for maintainers. ## Logging screenshot You can trigger a fatal error in the new error boundary component in most places in Kibana by adding a TypeError to a React component: `<p>{breakHere()}</p>` <img width="1586" alt="fatal error telemetry console log" src="97f973ac
-bb25-41f2-bfe2-547a23f2f450"> ## Telemetry work info Dashboard: <img width="1382" alt="image" src="4fe5353a
-61ba-405a-ac18-0dd6a044c182"> Discover: <img width="1331" alt="image" src="2161b552
-c441-4b7c-adef-25896147c08a"> ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
14 lines
718 B
TypeScript
14 lines
718 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
|
|
export { KibanaErrorBoundaryProvider } from './src/services/error_boundary_services';
|
|
export { KibanaErrorBoundary } from './src/ui/error_boundary';
|
|
export { ThrowIfError } from './src/ui/throw_if_error';
|
|
|
|
export { REACT_FATAL_ERROR_EVENT_TYPE, reactFatalErrorSchema } from './lib/telemetry_events';
|
|
export type { ReactFatalError } from './lib/telemetry_events';
|