Skip to content

Commit

Permalink
[Bug]fixed traces bug for missing MDS id (opensearch-project#2100)
Browse files Browse the repository at this point in the history
* fixed traces bug

Signed-off-by: sumukhswamy <[email protected]>

* addressed conflicts

Signed-off-by: sumukhswamy <[email protected]>

---------

Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: Sumukh Swamy <[email protected]>
  • Loading branch information
sumukhswamy authored Sep 4, 2024
1 parent 6d128ea commit 744a039
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 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_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';
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 @@ -570,6 +570,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 @@ -21,13 +21,16 @@ interface TraceDetailRenderProps {
http: HttpStart;
openSpanFlyout: (spanId: string) => void;
mode: TraceAnalyticsMode;
dataSourceMDSId: string;
}

export const TraceDetailRender = ({
traceId,
http,
openSpanFlyout,
mode,
dataSourceMDSId,

}: TraceDetailRenderProps) => {
const [fields, setFields] = useState<any>({});
const [serviceBreakdownData, setServiceBreakdownData] = useState([]);
Expand Down Expand Up @@ -74,6 +77,7 @@ export const TraceDetailRender = ({
page="app"
openSpanFlyout={openSpanFlyout}
mode={mode}
dataSourceMDSId={dataSourceMDSId}
/>
<EuiSpacer size="xs" />
<EuiHorizontalRule margin="s" />
Expand Down

0 comments on commit 744a039

Please sign in to comment.