Skip to content

vmui: apply corresponding filter type based on the field type in quick filtering UI #1607

Description

@hagen1778

Is your feature request related to a problem? Please describe

Image

On the screenshot above we see log entry with a list of fields. User clicked on a button Filter by this value next to the field service.name. The filter was applied in the top section, below the query input, as service.name="product-catalog". This is filter by field. However, the field user selected is actually a stream field.

Describe the solution you'd like

According to https://docs.victoriametrics.com/victorialogs/logsql/#stream-filter, there is big difference in filtering speed between: {app="nginx"} and app:="nginx". It would be great if vmui could automatically apply stream filter instead of field filter if it is possible.

Ideally, this optimization should be automatically applied by the backend. But there are constraints that don't allow this.

vmui can do it on its own. Response from the VictoriaLogs for /select/logsql/query calls already contains log lines with fields and stream fields separated. So vmui knows which fields are stream fields for each specific log entry.

It would be great if vmui could render such logs in the log entry view differently. And, what is the most important, differently process the Filter by this value click - apply stream filter automatically if clicked field is a stream field.

Additionally, it would be great to render applied filters belkow the query input in different styles with tooltips explaining where it is a regular field, and where it is a stream field filter.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestweb-uiIssues related to the user interface: layout, styling, usability, or UI-specific bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions