Skip to content

Commit

Permalink
fixed traces bug
Browse files Browse the repository at this point in the history
Signed-off-by: sumukhswamy <[email protected]>
  • Loading branch information
sumukhswamy committed Sep 4, 2024
1 parent 1c6ff11 commit b3db80f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ 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';
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();

Expand Down Expand Up @@ -572,6 +572,7 @@ export function Application(props: AppDetailProps) {
traceId={traceFlyoutId}
closeTraceFlyout={closeTraceFlyout}
openSpanFlyout={openSpanFlyout}
dataSourceMDSId=""
/>
)}
</EuiPage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
<TraceDetailRender traceId={traceId} http={http} openSpanFlyout={openSpanFlyout} mode='data_prepper'/>
<TraceDetailRender
traceId={traceId}
http={http}
openSpanFlyout={openSpanFlyout}
mode="data_prepper"
dataSourceMDSId={dataSourceMDSId}
/>
);
return (
<EuiFlyout data-test-subj="traceDetailFlyout" onClose={closeTraceFlyout} size="m">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>({});
const [serviceBreakdownData, setServiceBreakdownData] = useState([]);
const [payloadData, setPayloadData] = useState('');
Expand Down Expand Up @@ -69,6 +76,7 @@ export const TraceDetailRender = ({ traceId, http, openSpanFlyout, mode }: Trace
page="app"
openSpanFlyout={openSpanFlyout}
mode={mode}
dataSourceMDSId={dataSourceMDSId}
/>
<EuiSpacer size="xs" />
<EuiHorizontalRule margin="s" />
Expand Down

0 comments on commit b3db80f

Please sign in to comment.