From b3db80f510db6f1b50d43805554315f16e1e38f1 Mon Sep 17 00:00:00 2001 From: sumukhswamy Date: Mon, 26 Aug 2024 20:53:53 -0700 Subject: [PATCH 1/2] fixed traces bug Signed-off-by: sumukhswamy --- .../components/application.tsx | 5 +++-- .../flyout_components/trace_detail_flyout.tsx | 11 ++++++++-- .../flyout_components/trace_detail_render.tsx | 22 +++++++++++++------ 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/public/components/application_analytics/components/application.tsx b/public/components/application_analytics/components/application.tsx index 6825a4f8e..76b9fced1 100644 --- a/public/components/application_analytics/components/application.tsx +++ b/public/components/application_analytics/components/application.tsx @@ -54,7 +54,9 @@ import { } from '../../../../public/components/trace_analytics/components/common/helper_functions'; import { SpanDetailFlyout } from '../../../../public/components/trace_analytics/components/traces/span_detail_flyout'; import { SpanDetailTable } from '../../../../public/components/trace_analytics/components/traces/span_detail_table'; +import { HeaderControlledComponentsWrapper } from '../../../../public/plugin_headerControl'; import { TracesContent } from '../../../components/trace_analytics/components/traces/traces_content'; +import { coreRefs } from '../../../framework/core_refs'; import { Explorer } from '../../event_analytics/explorer/explorer'; import { ServicesContent } from '../../trace_analytics/components/services/services_content'; import { fetchAppById, initializeTabData } from '../helpers/utils'; @@ -62,8 +64,6 @@ import { AppAnalyticsComponentDeps } from '../home'; import { Configuration } from './configuration'; import { ServiceDetailFlyout } from './flyout_components/service_detail_flyout'; import { TraceDetailFlyout } from './flyout_components/trace_detail_flyout'; -import { coreRefs } from '../../../framework/core_refs'; -import { HeaderControlledComponentsWrapper } from '../../../../public/plugin_helpers/plugin_headerControl'; const newNavigation = coreRefs.chrome?.navGroup.getNavGroupEnabled(); @@ -572,6 +572,7 @@ export function Application(props: AppDetailProps) { traceId={traceFlyoutId} closeTraceFlyout={closeTraceFlyout} openSpanFlyout={openSpanFlyout} + dataSourceMDSId="" /> )} diff --git a/public/components/application_analytics/components/flyout_components/trace_detail_flyout.tsx b/public/components/application_analytics/components/flyout_components/trace_detail_flyout.tsx index a5ec5569a..c68f0537e 100644 --- a/public/components/application_analytics/components/flyout_components/trace_detail_flyout.tsx +++ b/public/components/application_analytics/components/flyout_components/trace_detail_flyout.tsx @@ -12,12 +12,19 @@ interface TraceFlyoutProps extends TraceAnalyticsComponentDeps { traceId: string; closeTraceFlyout: () => void; openSpanFlyout: (spanId: string) => void; + dataSourceMDSId: string; } export function TraceDetailFlyout(props: TraceFlyoutProps) { - const { traceId, http, closeTraceFlyout, openSpanFlyout } = props; + const { traceId, http, closeTraceFlyout, openSpanFlyout, dataSourceMDSId } = props; const renderContent = ( - + ); return ( diff --git a/public/components/application_analytics/components/flyout_components/trace_detail_render.tsx b/public/components/application_analytics/components/flyout_components/trace_detail_render.tsx index bb55a94d9..844293d84 100644 --- a/public/components/application_analytics/components/flyout_components/trace_detail_render.tsx +++ b/public/components/application_analytics/components/flyout_components/trace_detail_render.tsx @@ -3,27 +3,34 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiText, EuiSpacer, EuiHorizontalRule, EuiCodeBlock } from '@elastic/eui'; +import { EuiCodeBlock, EuiHorizontalRule, EuiSpacer, EuiText } from '@elastic/eui'; import React, { useEffect, useMemo, useState } from 'react'; +import { HttpStart } from '../../../../../../../src/core/public'; +import { TraceAnalyticsMode } from '../../../../../public/components/trace_analytics/home'; import { ServiceBreakdownPanel } from '../../../trace_analytics/components/traces/service_breakdown_panel'; import { SpanDetailPanel } from '../../../trace_analytics/components/traces/span_detail_panel'; import { - handleTraceViewRequest, - handleServicesPieChartRequest, handlePayloadRequest, + handleServicesPieChartRequest, + handleTraceViewRequest, } from '../../../trace_analytics/requests/traces_request_handler'; -import { HttpStart } from '../../../../../../../src/core/public'; import { getListItem } from '../../helpers/utils'; -import { TraceAnalyticsMode } from '../../../../../public/components/trace_analytics/home'; interface TraceDetailRenderProps { traceId: string; http: HttpStart; openSpanFlyout: (spanId: string) => void; - mode : TraceAnalyticsMode + mode: TraceAnalyticsMode; + dataSourceMDSId: string; } -export const TraceDetailRender = ({ traceId, http, openSpanFlyout, mode }: TraceDetailRenderProps) => { +export const TraceDetailRender = ({ + traceId, + http, + openSpanFlyout, + mode, + dataSourceMDSId, +}: TraceDetailRenderProps) => { const [fields, setFields] = useState({}); const [serviceBreakdownData, setServiceBreakdownData] = useState([]); const [payloadData, setPayloadData] = useState(''); @@ -69,6 +76,7 @@ export const TraceDetailRender = ({ traceId, http, openSpanFlyout, mode }: Trace page="app" openSpanFlyout={openSpanFlyout} mode={mode} + dataSourceMDSId={dataSourceMDSId} /> From e82ee72440e22e282b073b9ee792a08eb0d4ffb8 Mon Sep 17 00:00:00 2001 From: sumukhswamy Date: Wed, 4 Sep 2024 11:12:55 -0700 Subject: [PATCH 2/2] addressed conflicts Signed-off-by: sumukhswamy --- .../components/application_analytics/components/application.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/components/application_analytics/components/application.tsx b/public/components/application_analytics/components/application.tsx index 76b9fced1..3a9a6c7f6 100644 --- a/public/components/application_analytics/components/application.tsx +++ b/public/components/application_analytics/components/application.tsx @@ -54,7 +54,7 @@ import { } from '../../../../public/components/trace_analytics/components/common/helper_functions'; import { SpanDetailFlyout } from '../../../../public/components/trace_analytics/components/traces/span_detail_flyout'; import { SpanDetailTable } from '../../../../public/components/trace_analytics/components/traces/span_detail_table'; -import { HeaderControlledComponentsWrapper } from '../../../../public/plugin_headerControl'; +import { HeaderControlledComponentsWrapper } from '../../../../public/plugin_helpers/plugin_headerControl'; import { TracesContent } from '../../../components/trace_analytics/components/traces/traces_content'; import { coreRefs } from '../../../framework/core_refs'; import { Explorer } from '../../event_analytics/explorer/explorer';