Skip to content

Field Values Sidebar

The Field Values Sidebar is a Kibana-inspired field exploration panel for discovering and filtering log data quickly. It shows available fields and their top distinct values, so you can see what’s in your data and build queries from it.

The sidebar appears on the left side of the query interface and shows:

  • Queryable fields discovered from your current source
  • Up to 10 values per filterable field, with occurrence counts when available
  • Quick-filter buttons to add or exclude values from your query

Click on any field name to expand it and see its top values. Each value shows:

  • The actual value
  • How many times it appears in the lookup’s time range, when counts are available
  • Click a value to add it as a filter: field="value"
  • Alt/Option+click a value to exclude it: field!="value"

The filter is automatically added to your LogchefQL query, and results update immediately.

The sidebar uses a hybrid loading strategy to balance responsiveness with query performance:

For ClickHouse, LowCardinality and Enum columns load their values automatically when you open the sidebar. These column types are optimized for distinct value queries and return quickly.

For ClickHouse, String columns require a click to load their values. This prevents slow queries on high-cardinality fields (like request IDs or timestamps) that could have millions of unique values.

For VictoriaLogs, fields are discovered dynamically for the selected time range and values are fetched on demand.

Fields with 6 or fewer distinct values automatically expand to show all values. This gives you quick access to common filter targets like log levels (debug, info, warn, error) without extra clicks.

Collapsed fields display a badge showing the total number of distinct values, helping you identify high vs. low cardinality fields at a glance.

The sidebar is context-aware and integrates with your current view:

Values and counts use the selected time range. Loki can cap the lookup window.

When you have an active LogchefQL query, field value counts reflect the matching logs. For example, with level="error", the counts for other fields cover error logs. Loki’s preloaded label values use only stream selector matchers.

The sidebar automatically updates when you run a query, keeping values in sync with your current view.

The sidebar handles errors gracefully:

  • Per-field errors: If one field fails to load, other fields continue working normally
  • Retry button: Failed fields show a retry button to attempt loading again
  • Progressive loading: Values load in parallel (up to 4 concurrent requests) for faster initial display

The sidebar behavior depends on the datasource:

Column Type Loading Notes
LowCardinality Auto Optimized for distinct queries
Enum Auto Fast enumeration of possible values
String On-demand Click to load (avoids slow high-cardinality queries)

Complex types like Map, Array, Tuple, and JSON are excluded since they don’t have simple distinct values.

  • Fields are discovered dynamically rather than read from a fixed SQL schema
  • Value lookups are time-range-aware
  • Internal fields such as _stream and _stream_id may exist, but Logchef hides noisy defaults in the main table view

When you open the sidebar, it requests values for up to 30 stream labels in one call to Logchef. The preload reads the Loki index using the query’s leading stream selector, or the source’s default selector if the query has none. Preloaded values come without counts.

Expand a label that was not preloaded or a detected string field to see values and counts for the full log query. The source’s sidebar_lookback_seconds caps the time range for both lookups. See the Loki tutorial for field types and query limits.

  1. Use for exploration: When investigating unfamiliar data, expand fields to discover what values exist
  2. Build queries visually: Click through values to construct LogchefQL filters without typing
  3. Identify patterns: High occurrence counts reveal common values; low counts may indicate anomalies
  4. Narrow first: Apply time range and basic filters before loading String field values to get faster, more relevant results