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,ORorNOTkeywords, 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.
| Query | Matches |
|---|---|
timeout | Messages containing the whole word timeout. time does not match timeout. |
"connection reset" | Messages containing that exact phrase, in that order. |
payment failed | Messages containing both words, anywhere. |
-healthcheck | Messages 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 matchConnection RESET. *in free text is a literal character, not a wildcard.- Text made only of punctuation, such as
"...", is an error.
Fields
| Field | Example | Notes |
|---|---|---|
service: | service:checkout | Case-insensitive. |
env: or environment: | env:production,staging | Case-insensitive. |
level: or severity: | level:error, level:>=warn | See Levels. |
trace: | trace:4bf92f3577b34da6a3ce929d0e0e4736 | Exact trace id, case-insensitive. |
type: | type:log, type:heartbeat,check_result | log, heartbeat, check_result. Case-sensitive. |
attrs.<key>: | attrs.route:/v1/pay | Exact, case-sensitive. * is a wildcard. |
resource.<key>: | resource.host.name:web-1 | Exact, 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.idlooks up the keyuser.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.
| Query | Matches |
|---|---|
level:error | Exactly error |
level:error,fatal | error or fatal |
level:>=warn | warn, error, fatal |
level:<info | trace, debug, and events with no level |
- Comparisons are
>=,<=,>and<, and work only onlevel. They cannot be combined with a list:level:>=warn,erroris an error. - Common logger spellings are accepted:
warning,err,crit,critical,panic,notice,verbose,dbgand others. - Events with no level (heartbeat pings, check results) count as below
trace, solevel:<=infoincludes 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