Logs Explorer ignores `orderBy` from the `compositeQuery` URL param — list view always opens with `timestamp:desc`
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:
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
- Build a logs-explorer URL per the docs with
orderBy: [{"columnName": "timestamp", "order": "asc"}]incompositeQuery(any filter matching existing logs). - Open it.
- Filters and time range apply, but the "Order by" control shows
timestamp (desc)and rows render newest-first; the URL'sorderBy(still visible in the normalizedcompositeQueryafter 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:
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.
Source: SigNoz/signoz