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
fix: trace table pagination (#1749)
Vishal Sharmab0ec61988100
diff --git a/frontend/src/container/Trace/TraceTable/index.tsx b/frontend/src/container/Trace/TraceTable/index.tsxindex d66dd37592..aa9fc1cf6b 100644--- a/frontend/src/container/Trace/TraceTable/index.tsx+++ b/frontend/src/container/Trace/TraceTable/index.tsx@@ -1,6 +1,10 @@import { TableProps, Tag, Typography } from 'antd';import Table, { ColumnsType } from 'antd/lib/table';import ROUTES from 'constants/routes';+import {+ getSpanOrder,+ getSpanOrderParam,+} from 'container/Trace/TraceTable/util';import dayjs from 'dayjs';import duration from 'dayjs/plugin/duration';import history from 'lib/history';@@ -111,16 +115,6 @@ function TraceTable(): JSX.Element {},];- const getSortKey = (key: string): string => {- if (key === 'durationNano') {- return 'duration';- }- if (key === 'timestamp') {- return 'timestamp';- }- return '';- };-const onChangeHandler: TableProps<TableType>['onChange'] = (props,_,@@ -129,8 +123,8 @@ function TraceTable(): JSX.Element {if (!Array.isArray(sort)) {const { order = spansAggregateOrder } = sort;if (props.current && props.pageSize) {- const spanOrder = order === 'ascend' ? 'ascending' : 'descending';- const orderParam = getSortKey(sort.field as string);+ const spanOrder = getSpanOrder(order || '');+ const orderParam = getSpanOrderParam(sort.field as string);dispatch({type: UPDATE_SPAN_ORDER,diff --git a/frontend/src/container/Trace/TraceTable/util.ts b/frontend/src/container/Trace/TraceTable/util.tsnew file mode 100644index 0000000000..08276636c1--- /dev/null+++ b/frontend/src/container/Trace/TraceTable/util.ts@@ -0,0 +1,19 @@+export const getSpanOrderParam = (key: string): string => {+ if (key === 'durationNano') {+ return 'duration';+ }+ if (key === 'timestamp') {+ return 'timestamp';+ }+ return '';+};++export const getSpanOrder = (order: string): string => {+ if (order === 'ascend') {+ return 'ascending';+ }+ if (order === 'descend') {+ return 'descending';+ }+ return '';+};