From e8dbcf0fb4506c8f6b529b7a827a4c50b9886178 Mon Sep 17 00:00:00 2001 From: Bena Kansara <69037875+benakansara@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:57:05 +0100 Subject: [PATCH] [RCA] [Events timeline] Show all events (#202235) As part of https://github.com/elastic/kibana/issues/200799, this PR removes filter (previously the filter was based on any group by field, which was changed to focus only on `service.name` for kubecon demo) so that all events are shown on events timeline. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Faisal Kanout --- .../components/events_timeline/events_timeline.tsx | 12 ------------ .../investigate_app/tsconfig.json | 1 - 2 files changed, 13 deletions(-) diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/events_timeline/events_timeline.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/events_timeline/events_timeline.tsx index c3f92139bd936..45b245f68b4b0 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/events_timeline/events_timeline.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/events_timeline/events_timeline.tsx @@ -11,9 +11,6 @@ import { Chart, Axis, AreaSeries, Position, ScaleType, Settings } from '@elastic import { useActiveCursor } from '@kbn/charts-plugin/public'; import { EuiSkeletonText } from '@elastic/eui'; import { getBrushData } from '@kbn/observability-utils-browser/chart/utils'; -import { Group } from '@kbn/observability-alerting-rule-utils'; -import { ALERT_GROUP } from '@kbn/rule-data-utils'; -import { SERVICE_NAME } from '@kbn/observability-shared-plugin/common'; import { AnnotationEvent } from './annotation_event'; import { TIME_LINE_THEME } from './timeline_theme'; import { useFetchEvents } from '../../../../hooks/use_fetch_events'; @@ -27,19 +24,10 @@ export const EventsTimeLine = () => { const baseTheme = dependencies.start.charts.theme.useChartsBaseTheme(); const { globalParams, updateInvestigationParams } = useInvestigation(); - const { alert } = useInvestigation(); - - const filter = useMemo(() => { - const group = (alert?.[ALERT_GROUP] as unknown as Group[])?.find( - ({ field }) => field === SERVICE_NAME - ); - return group ? `{"${SERVICE_NAME}":"${alert?.[SERVICE_NAME]}"}` : ''; - }, [alert]); const { data: events, isLoading } = useFetchEvents({ rangeFrom: globalParams.timeRange.from, rangeTo: globalParams.timeRange.to, - filter, }); const chartRef = useRef(null); diff --git a/x-pack/plugins/observability_solution/investigate_app/tsconfig.json b/x-pack/plugins/observability_solution/investigate_app/tsconfig.json index 0851a13367091..bc67b591a57b8 100644 --- a/x-pack/plugins/observability_solution/investigate_app/tsconfig.json +++ b/x-pack/plugins/observability_solution/investigate_app/tsconfig.json @@ -66,7 +66,6 @@ "@kbn/calculate-auto", "@kbn/ml-random-sampler-utils", "@kbn/charts-plugin", - "@kbn/observability-alerting-rule-utils", "@kbn/observability-utils-browser", "@kbn/usage-collection-plugin", "@kbn/inference-common",