Open
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
createVolumeQueryinterface method. This is currently implemented for Loki and VictoriaLogs, but not yet for ClickHouse.Changes to other plugins
VictoriaLogs
createVolumeQuerymethod to its LogQueryPlugin interface| stats by (_time:<interval>, _stream) count() as volumequeries__name__metadata label from time series results for cleaner histogram legendsLoki
createVolumeQuerymethod to its LogQueryPlugin interfacesum by (level, detected_level) (count_over_time(...))queriesClickHouse
createVolumeQuerymethod to its LogQueryPlugin interfacenull(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
percliand copy them to theplugin_archivedirectory 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 withmake 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 theX-Scope-OrgIDheader totenant1in the Loki datasource in Perses.Screenshots
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes