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.

fix: properly render \n and \t in log details + apply Geist Mono font to the logs (#5347)

Shaheer Kochaib0e355eb6440
diff --git a/frontend/public/fonts/GeistMonoVF.woff2 b/frontend/public/fonts/GeistMonoVF.woff2
new file mode 100644
index 0000000000..fb2f024aca
Binary files /dev/null and b/frontend/public/fonts/GeistMonoVF.woff2 differ
diff --git a/frontend/src/components/LogDetail/LogDetails.styles.scss b/frontend/src/components/LogDetail/LogDetails.styles.scss
index c8ac0be91f..5cd014b71b 100644
--- a/frontend/src/components/LogDetail/LogDetails.styles.scss
+++ b/frontend/src/components/LogDetail/LogDetails.styles.scss
@@ -52,7 +52,7 @@
.log-body {
font-family: 'SF Mono';
- font-family: 'Space Mono', monospace;
+ font-family: 'Geist Mono';
font-size: var(--font-size-sm);
font-weight: var(--font-weight-normal);
diff --git a/frontend/src/components/Logs/RawLogView/styles.ts b/frontend/src/components/Logs/RawLogView/styles.ts
index 357eed0324..d86de435c2 100644
--- a/frontend/src/components/Logs/RawLogView/styles.ts
+++ b/frontend/src/components/Logs/RawLogView/styles.ts
@@ -49,7 +49,7 @@ export const ExpandIconWrapper = styled(Col)`
export const RawLogContent = styled.div<RawLogContentProps>`
margin-bottom: 0;
font-family: 'SF Mono', monospace;
- font-family: 'Space Mono', monospace;
+ font-family: 'Geist Mono';
font-size: 13px;
font-weight: 400;
text-align: left;
diff --git a/frontend/src/container/LogDetailedView/FieldRenderer.styles.scss b/frontend/src/container/LogDetailedView/FieldRenderer.styles.scss
index bd24601b18..7e43e1caf3 100644
--- a/frontend/src/container/LogDetailedView/FieldRenderer.styles.scss
+++ b/frontend/src/container/LogDetailedView/FieldRenderer.styles.scss
@@ -8,7 +8,7 @@
.label {
color: var(--text-robin-400);
font-family: SF Mono;
- font-family: 'Space Mono', monospace;
+ font-family: 'Geist Mono';
font-size: 13px;
font-weight: var(--font-weight-normal);
line-height: 18px;
diff --git a/frontend/src/container/LogDetailedView/JsonView.tsx b/frontend/src/container/LogDetailedView/JsonView.tsx
index 1f22b1a134..9766b8db6e 100644
--- a/frontend/src/container/LogDetailedView/JsonView.tsx
+++ b/frontend/src/container/LogDetailedView/JsonView.tsx
@@ -28,7 +28,7 @@ function JSONView({ logData }: JSONViewProps): JSX.Element {
},
fontWeight: 400,
// fontFamily: 'SF Mono',
- fontFamily: 'Space Mono',
+ fontFamily: 'Geist Mono',
fontSize: 13,
lineHeight: '18px',
colorDecorators: true,
diff --git a/frontend/src/container/LogDetailedView/Overview.tsx b/frontend/src/container/LogDetailedView/Overview.tsx
index bd54524931..cf98ac11a9 100644
--- a/frontend/src/container/LogDetailedView/Overview.tsx
+++ b/frontend/src/container/LogDetailedView/Overview.tsx
@@ -53,7 +53,7 @@ function Overview({
enabled: false,
},
fontWeight: 400,
- fontFamily: 'Space Mono',
+ fontFamily: 'Geist Mono',
fontSize: 13,
lineHeight: '18px',
colorDecorators: true,
diff --git a/frontend/src/container/LogDetailedView/TableView.styles.scss b/frontend/src/container/LogDetailedView/TableView.styles.scss
index d9cbdcabbb..2f092dc04d 100644
--- a/frontend/src/container/LogDetailedView/TableView.styles.scss
+++ b/frontend/src/container/LogDetailedView/TableView.styles.scss
@@ -57,6 +57,8 @@
background: rgba(22, 25, 34, 0.4);
.value-field {
+ font-family: 'Geist Mono';
+
position: relative;
}
diff --git a/frontend/src/container/LogDetailedView/TableView.tsx b/frontend/src/container/LogDetailedView/TableView.tsx
index a69fba6441..810c946fb0 100644
--- a/frontend/src/container/LogDetailedView/TableView.tsx
+++ b/frontend/src/container/LogDetailedView/TableView.tsx
@@ -289,7 +289,13 @@ function TableView({
return (
<div className="value-field">
<CopyClipboardHOC textToCopy={textToCopy}>
- <span style={{ color: Color.BG_SIENNA_400 }}>
+ <span
+ style={{
+ color: Color.BG_SIENNA_400,
+ whiteSpace: 'pre-wrap',
+ tabSize: 4,
+ }}
+ >
{removeEscapeCharacters(fieldData.value)}
</span>
</CopyClipboardHOC>
diff --git a/frontend/src/container/LogsExplorerChart/LogsExplorerChart.styled.ts b/frontend/src/container/LogsExplorerChart/LogsExplorerChart.styled.ts
index fec5dc1f0c..69299bf0d0 100644
--- a/frontend/src/container/LogsExplorerChart/LogsExplorerChart.styled.ts
+++ b/frontend/src/container/LogsExplorerChart/LogsExplorerChart.styled.ts
@@ -9,6 +9,6 @@ export const CardStyled = styled(Card)`
height: 200px;
min-height: 200px;
padding: 0 16px 16px 16px;
- font-family: 'Space Mono', monospace;
+ font-family: 'Geist Mono';
}
`;
diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss
index 1684d7de2a..b5aca15ddf 100644
--- a/frontend/src/styles.scss
+++ b/frontend/src/styles.scss
@@ -266,3 +266,10 @@ modal - 1000
notifications - 2050
*/
+
+@font-face {
+ font-family: 'Geist Mono';
+ src: local('Geist Mono'),
+ url('../public/fonts/GeistMonoVF.woff2') format('woff');
+ /* Add other formats if needed (e.g., woff2, truetype, opentype, svg) */
+}