Skip to content

LOGS: Pagination fails with multiple ORDER BY columns #7678

@maca88

Description

@maca88

Bug description

When trying to order logs with a number attribute (Sequence) and timestamp, I only receive the first page (100 items):

Image

When I scroll to the bottom, the frontend correctly requests the next page from the backend with the expected offset:

Image

However, the response does not contain any data:

Image

Meanwhile, the total count in the table view is correctly displayed:

Image

Expected behavior

All 252 items should be displayed, not just the first 100. The second page should include results from this ClickHouse query:

SELECT
  formatDateTime(toDateTime(timestamp), '%F %T') AS timestamp,
  severity_text as level,
  body,
  attributes_number['Sequence'] AS sequence
FROM signoz_logs.distributed_logs_v2
where attributes_string['CorrelationId'] = 'tkWVNHYOI20ksKh6uZwXE'
ORDER BY sequence desc, timestamp desc
limit 100 offset 100

How to reproduce

  1. Add two attributes to ORDER BY, where the first is a number (e.g., Sequence), and the second is a timestamp.
  2. Try to scroll to the next page in the log view.

Version information

  • Signoz version: v0.79.1
  • Browser version: Chrome 135.0.7049.42

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions