ZevSight
Open app

Explore

Search syntax

The ZevSight query language for log search, live tail and log alert rules, with fields, levels, phrases, attributes, OR lists and negation.

The same query language is used in the explorer’s query bar, the q parameter of the Query API, live tail filters and log alert rules. A query is at most 2,000 characters.

service:api env:production level:>=warn "connection reset" attrs.route:/v1/* -attrs.user_id:42

How terms combine

  • A query is a list of terms separated by spaces. Every term must match: terms are ANDed.
  • There are no AND, OR or NOT keywords, no parentheses and no regular expressions.
  • For OR, put several values in one field term, separated by commas: service:auth,api.
  • A leading - negates any term: -debug, -service:auth,api (neither), -"connection reset".

Free text

Bare words and quoted phrases match the log message only.

QueryMatches
timeoutMessages containing the whole word timeout. time does not match timeout.
"connection reset"Messages containing that exact phrase, in that order.
payment failedMessages containing both words, anywhere.
-healthcheckMessages without the word healthcheck.
  • Words are matched as whole tokens, case-insensitively (ASCII letters).
  • A phrase with several words or punctuation must also appear as an exact substring, ignoring case. "reset connection" does not match Connection RESET.
  • * in free text is a literal character, not a wildcard.
  • Text made only of punctuation, such as "...", is an error.

Fields

FieldExampleNotes
service:service:checkoutCase-insensitive.
env: or environment:env:production,stagingCase-insensitive.
level: or severity:level:error, level:>=warnSee Levels.
trace:trace:4bf92f3577b34da6a3ce929d0e0e4736Exact trace id, case-insensitive.
type:type:log, type:heartbeat,check_resultlog, heartbeat, check_result. Case-sensitive.
attrs.<key>:attrs.route:/v1/payExact, case-sensitive. * is a wildcard.
resource.<key>:resource.host.name:web-1Exact, case-sensitive. * is a wildcard.
  • An empty value (service:) is an error.
  • An unknown field name, such as host:web-1, is treated as free text.
  • Attribute keys are flat. attrs.user.id looks up the key user.id, as sent by loggers that flatten nested objects.
  • A missing attribute reads as an empty value. So attrs.x:* matches every event, and there is no “field exists” test.

Lists and wildcards

  • level:error,fatal, type:log,heartbeat, attrs.route:/v1/pay,/v1/cart: any of the values.
  • A value with * is a wildcard and can be mixed into a list: attrs.route:/v1/*,/v2/pay.
  • At most 50 values per term. Empty values (service:a,,b) are an error.
  • \, is a literal comma and \\ a literal backslash.

Levels

Levels in order: trace < debug < info < warn < error < fatal.

QueryMatches
level:errorExactly error
level:error,fatalerror or fatal
level:>=warnwarn, error, fatal
level:<infotrace, debug, and events with no level
  • Comparisons are >=, <=, > and <, and work only on level. They cannot be combined with a list: level:>=warn,error is an error.
  • Common logger spellings are accepted: warning, err, crit, critical, panic, notice, verbose, dbg and others.
  • Events with no level (heartbeat pings, check results) count as below trace, so level:<=info includes them.

Examples

service:api env:production level:>=error
"payment provider timeout" -env:development
service:checkout attrs.route:/v1/pay level:>=warn
trace:4bf92f3577b34da6a3ce929d0e0e4736
type:heartbeat attrs.monitor:nightly-export
resource.host.name:web-1 -level:debug
attrs.status:5*
service:auth,api -"health check"

Errors

An invalid query returns 400 INVALID_REQUEST with a message saying what is wrong, for example attrs.who: needs a value. Common causes: an unclosed quote, an unknown level (level:loud), an empty value, an unknown type, or a list with a level comparison.

Built 29 November 2026 · View as Markdown