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.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
feat: truncate very long lines in traces explorer list view (#6987)
Shaheer Kochaiaecbb71ce4fb
diff --git a/frontend/src/container/PanelWrapper/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snap b/frontend/src/container/PanelWrapper/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snapindex 3a0fb1a954..0f1a725125 100644--- a/frontend/src/container/PanelWrapper/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snap+++ b/frontend/src/container/PanelWrapper/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snap@@ -266,7 +266,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">demo-app</div>@@ -277,7 +277,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">4.35 s</div>@@ -292,7 +292,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">customer</div>@@ -303,7 +303,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">431 ms</div>@@ -318,7 +318,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">mysql</div>@@ -329,7 +329,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">431 ms</div>@@ -344,7 +344,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">frontend</div>@@ -355,7 +355,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">287 ms</div>@@ -370,7 +370,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">driver</div>@@ -381,7 +381,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">230 ms</div>@@ -396,7 +396,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">route</div>@@ -407,7 +407,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">66.4 ms</div>@@ -422,7 +422,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">redis</div>@@ -433,7 +433,7 @@ exports[`Table panel wrappper tests table should render fine with the query resp><div><div- class="line-clamped-text"+ class="line-clamped-wrapper__text">31.3 ms</div>diff --git a/frontend/src/container/TracesExplorer/ListView/utils.tsx b/frontend/src/container/TracesExplorer/ListView/utils.tsxindex 3a4e8934b9..1a0a43d4ca 100644--- a/frontend/src/container/TracesExplorer/ListView/utils.tsx+++ b/frontend/src/container/TracesExplorer/ListView/utils.tsx@@ -6,6 +6,7 @@ import { getMs } from 'container/Trace/Filters/Panel/PanelBody/Duration/util';import { formUrlParams } from 'container/TraceDetail/utils';import { TimestampInput } from 'hooks/useTimezoneFormatter/useTimezoneFormatter';import { RowData } from 'lib/query/createTableColumnsFromQuery';+import LineClampedText from 'periscope/components/LineClampedText/LineClampedText';import { Link } from 'react-router-dom';import { ILog } from 'types/api/logs/log';import { BaseAutocompleteData } from 'types/api/queryBuilder/queryAutocompleteResponse';@@ -113,7 +114,9 @@ export const getListColumns = (return (<BlockLink to={getTraceLink(item)} openInNewTab={false}>- <Typography data-testid={key}>{value}</Typography>+ <Typography data-testid={key}>+ <LineClampedText text={value} lines={3} />+ </Typography></BlockLink>);},diff --git a/frontend/src/periscope/components/LineClampedText/LineClampedText.styles.scss b/frontend/src/periscope/components/LineClampedText/LineClampedText.styles.scssindex 644ddc480b..8f1aa0ad48 100644--- a/frontend/src/periscope/components/LineClampedText/LineClampedText.styles.scss+++ b/frontend/src/periscope/components/LineClampedText/LineClampedText.styles.scss@@ -1,6 +1,10 @@-.line-clamped-text {- display: -webkit-box;- -webkit-box-orient: vertical;- overflow: hidden;- text-overflow: ellipsis;+.line-clamped-wrapper {+ max-height: 300px;+ overflow-y: auto;+ &__text {+ display: -webkit-box;+ -webkit-box-orient: vertical;+ overflow: hidden;+ text-overflow: ellipsis;+ }}diff --git a/frontend/src/periscope/components/LineClampedText/LineClampedText.tsx b/frontend/src/periscope/components/LineClampedText/LineClampedText.tsxindex 9c77d514e0..dfcafcf02d 100644--- a/frontend/src/periscope/components/LineClampedText/LineClampedText.tsx+++ b/frontend/src/periscope/components/LineClampedText/LineClampedText.tsx@@ -35,7 +35,7 @@ function LineClampedText({const content = (<divref={textRef}- className="line-clamped-text"+ className="line-clamped-wrapper__text"style={{WebkitLineClamp: lines,}}@@ -46,7 +46,9 @@ function LineClampedText({return isOverflowing ? (<Tooltip- title={text}+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events+ title={<div onClick={(e): void => e.stopPropagation()}>{text}</div>}+ overlayClassName="line-clamped-wrapper"// eslint-disable-next-line react/jsx-props-no-spreading{...tooltipProps}>