Skip to content

[FEATURE] Add LogExplorer plugin#577

Open
rickardsjp wants to merge 18 commits intoperses:mainfrom
rickardsjp:logexplorer
Open

[FEATURE] Add LogExplorer plugin#577
rickardsjp wants to merge 18 commits intoperses:mainfrom
rickardsjp:logexplorer

Conversation

@rickardsjp
Copy link
Contributor

@rickardsjp rickardsjp commented Feb 19, 2026

Description

This PR adds a Log Explorer for the growing number of log query datasources. The LogExplorer consists of a MultiQueryEditor for building log queries, an automatically-generated volume histogram showing log volume over time, and a LogsTable displaying the log entries. The histogram requires the log data source plugins to implement an optional createVolumeQuery interface method. This is currently implemented for Loki and VictoriaLogs, but not yet for ClickHouse.

Changes to other plugins

VictoriaLogs

  • Added optional createVolumeQuery method to its LogQueryPlugin interface
  • Implemented with dynamic interval selection (targets ~40 histogram bars across time range)
  • Generates | stats by (_time:<interval>, _stream) count() as volume queries
  • Filters __name__ metadata label from time series results for cleaner histogram legends

Loki

  • Added optional createVolumeQuery method to its LogQueryPlugin interface
  • Implemented with dynamic interval selection
  • Generates sum by (level, detected_level) (count_over_time(...)) queries

ClickHouse

  • Added optional createVolumeQuery method to its LogQueryPlugin interface
  • Stub implementation returns null (requires SQL query parsing for proper implementation)

Testing this PR:

Because this PR changes multiple plugins at once, you will need to build the plugins using percli and copy them to the plugin_archive directory of your perses server. I believe the standard plugin development server can only run one plugin at once. If you clone the victorialogs repo, you can start a sample instance with make docker-vl-single-up. For Loki, you can use Grafana's instructions to set up a Loki datasource locally using docker compose. Remember to set the X-Scope-OrgID header to tenant1 in the Loki datasource in Perses.

Screenshots

Screenshot 2026-02-19 at 21 36 11 Screenshot 2026-02-19 at 21 34 11 Screenshot 2026-02-19 at 21 36 17

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants