#12355·signoz

Logs Explorer ignores `orderBy` from the `compositeQuery` URL param — list view always opens with `timestamp:desc`

Author: 1oglop1Created Jul 31, 2026Updated Sep 30, 2026

Bug description

We generate deep links into the Logs Explorer following the Create Logs URL for Explorer page doc, with orderBy: [{"columnName": "timestamp", "order": "asc"}] inside the (twice-encoded) compositeQuery param. The explorer honors the filters and the time range from the URL, but the list view always renders newest-first: the initial order is hardcoded and never reads the orderBy carried in the URL:

https://github.com/SigNoz/signoz/blob/30dcb944eb4f788cff2c67366d983cdccce47211/frontend/src/container/LogsExplorerViews/index.tsx#L114

typescript
const [orderBy, setOrderBy] = useState<string>('timestamp:desc');

Same on the released tag we run: https://github.com/SigNoz/signoz/blob/v0.133.0/frontend/src/container/LogsExplorerViews/index.tsx#L108

Flipping the "Order by" dropdown to timestamp (asc) works, but the choice is neither shareable nor deep-linkable — every opened link needs the manual flip. Our use case: an internal tool links each CI/workflow step to its pod logs, which people read chronologically top-to-bottom.

Expected behavior

When the compositeQuery URL param contains an orderBy, the Logs Explorer list view should open with that order instead of the hardcoded timestamp:desc.

How to reproduce

  1. Build a logs-explorer URL per the docs with orderBy: [{"columnName": "timestamp", "order": "asc"}] in compositeQuery (any filter matching existing logs).
  2. Open it.
  3. Filters and time range apply, but the "Order by" control shows timestamp (desc) and rows render newest-first; the URL's orderBy (still visible in the normalized compositeQuery after the v5 rewrite) is ignored.

Version information

  • Signoz version: 0.133.0 (self-host)
  • Browser version: any
  • Your OS and version: any

Additional context

Suggested fix — seed the initial state from the composite query already parsed for the page instead of a constant, e.g. in LogsExplorerViews/index.tsx:

typescript
const compositeQueryParam = useGetCompositeQueryParam();
const urlOrder = compositeQueryParam?.builder?.queryData?.[0]?.orderBy?.[0];
const [orderBy, setOrderBy] = useState<string>(
	urlOrder ? `${urlOrder.columnName}:${urlOrder.order}` : 'timestamp:desc',
);

useGetCompositeQueryParam already handles both the legacy filters.items shape and the v5 format, and orderBy survives its conversion, so this covers old and new deep links. Happy to send a PR if the approach sounds right.