Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

feat: stack trace is show in monaco editor (#1091)

palash-signoz3789e25a1e62
diff --git a/frontend/src/container/TraceDetail/SelectedSpanDetails/ErrorTag.tsx b/frontend/src/container/TraceDetail/SelectedSpanDetails/ErrorTag.tsx
index d2c3cfb988..2a663387a5 100644
--- a/frontend/src/container/TraceDetail/SelectedSpanDetails/ErrorTag.tsx
+++ b/frontend/src/container/TraceDetail/SelectedSpanDetails/ErrorTag.tsx
@@ -1,12 +1,13 @@
import { Collapse, Modal } from 'antd';
+import Editor from 'components/Editor';
import { StyledButton } from 'components/Styled';
import useThemeMode from 'hooks/useThemeMode';
-import { keys, map } from 'lodash-es';
+import keys from 'lodash-es/keys';
+import map from 'lodash-es/map';
import React, { useState } from 'react';
import { ITraceTree } from 'types/api/trace/getTraceItem';
import { CustomSubText, CustomSubTitle, styles } from './styles';
-// import Editor from 'components/Editor';
const { Panel } = Collapse;
@@ -70,17 +71,24 @@ function ErrorTag({ event }: ErrorTagProps): JSX.Element {
</Collapse>
);
})}
+
<Modal
onCancel={(): void => onToggleHandler(false)}
title="Log Message"
visible={isOpen}
destroyOnClose
footer={[]}
+ width="70vw"
>
<CustomSubTitle>{text.text}</CustomSubTitle>
- <CustomSubText ellipsis={false} isDarkMode={isDarkMode}>
- {text.subText}
- </CustomSubText>
+
+ {text.text === 'exception.stacktrace' ? (
+ <Editor onChange={(): void => {}} readOnly value={text.subText} />
+ ) : (
+ <CustomSubText ellipsis={false} isDarkMode={isDarkMode}>
+ {text.subText}
+ </CustomSubText>
+ )}
</Modal>
</>
);