Search Syntax
Search syntax is the set of rules for the queries you write in the Log Explorer search bar. You combine terms and operators, and choose by how you write it whether to search the message body, search an attribute with an @ prefix, or search a tag in key:value form.
Overview
The cause of stumbling in log search is less often that the term you want is missing and more often that the query you wrote is not searching where you think. Writing hello targets only a limited set of attributes such as the message body, while writing *:hello targets every attribute, and the handling of uppercase and lowercase changes there as well. It is the concept to keep in mind when no results appear in the search bar, when you realize you wrote AND and OR in lowercase, when you copy the same query to a monitor or dashboard, and when you are unsure whether the same way of writing works in the trace search bar.
A query built from terms and operators
There are two kinds of terms you can write in a query: a single word such as hello, and a sequence of words enclosed in double quotes such as "hello dolly" (as of October 2026; Source: Log Search Syntax). Multiple terms are joined with AND, OR, and the exclusion -, and terms placed side by side with nothing between them are treated as AND. The role of the screen where you enter this query is left to Log Explorer. Just searching attributes and tags does not require creating a Facet first, but when you search a numeric attribute by size or range, register it as a facet first.
Where uppercase and lowercase are distinguished and where they are not
The AND and OR operators are case-sensitive, so write them in uppercase if you want them to work as operators (as of October 2026; Source: Log Search Syntax). Attribute search is also case-sensitive, and @http.method:get does not hit logs with the value GET. The official documentation describes two ways to search without distinguishing case. One is to write it as a full-text search with *:; the other is to apply the lowercase filter when extracting the value with a Grok Parser in the pipeline, so it is stored normalized to lowercase. The distinction between attributes and tags itself is left to the table in Attribute.
Searching the message body, an attribute, or a tag
Even for the same hello, the range searched changes with how you write it.
| How you write it | Range searched | Example |
|---|---|---|
| Term only (free text) | The message, @title, @error.message, and @error.stack attributes | hello |
Prefix with *: (full text) | All attributes including the message body, without distinguishing uppercase from lowercase | *:"hello world" |
Prefix with @ (attribute) | The single specified attribute, distinguishing uppercase from lowercase (numeric ranges only for attributes registered as facets) | @http.status_code:[400 TO 499] |
key:value (tags and reserved attributes) | Tags, and reserved attributes such as host / service / status | env:(prod OR test) |
Fill one character with ? | Attribute and tag values containing spaces or special characters | @my_attribute:hello?world |
There are places where full-text search cannot be used. It cannot be written in index or archive filters, pipeline filters, rehydration-from-archive filters, filters for metrics generated from logs, or Live Tail. Where it can be used is Log Management, plus queries in monitors, dashboards, and notebooks (Source: Log Search Syntax). Escape special characters such as -, :, *, and spaces with \; / can be written as is. Special characters inside the message body cannot be searched, so if you want to search for them, extract them into an attribute with a Grok parser first and then search.
What changes in the trace search bar?
The trace search bar is also built from terms and operators, and span attributes take an @ prefix (as of October 2026; Source: Query Syntax). Where the difference appears is in the lineup of reserved attributes. The list of log reserved attributes does not include env, and env:prod is searched as a tag. In traces, env is among the reserved attributes that need no @, along with operation_name and resource_name. The characters that need escaping also differ: /, which passes as written in logs, is subject to escaping in traces. When you copy a query that filters by URL path from the log search bar to the trace search bar, add \ before each /.
Review how your saved queries are written
Queries in saved views and monitors keep running as they were written when created. As the author's recommendation here, start by picking one query you use often and writing down which way of writing in the table each term corresponds to. A term-only query such as error searches only the message body and some attributes, so if you want to catch errors that went into attributes, replace it with *:error or a query with @. For queries that filter by an attribute value, count with full-text search whether the same value is also arriving in uppercase; a difference in counts is the signal to review how the query is written.