Searching Spans and Logs
In addition to the SQL-like query language, Uptrace lets you search spans and logs using a concise natural syntax. The search bar accepts plain words, phrases, logical operators, and attribute-scoped filters — making it faster to find specific records without writing full UQL expressions.
Word filters
The simplest query is a single word that must be found within the search scope.
Example: The query error matches:
err
error
ERROR
ERRor
an error just occurred
Multiple words (AND logic)
When your query contains multiple words separated by spaces, all words must be present in the search scope.
Example: error select matches:
error select
select error
an error has occurred when executing a select query
Multiple words (OR logic)
Separate words with a pipe (|) to match records containing any of the terms.
Example: select|update matches:
select
update
select update
Phrase filters
Enclose a phrase in double quotes to require an exact match, including spaces and punctuation.
Example: "select query" matches:
an error has occurred when executing a select query
select query
But does not match:
query select
selecting a query
Negative filters
Prefix any term or phrase with - to exclude matching records.
Example: error -ssh finds error logs that do not contain the word ssh.
Combining filters
error "database connection" -timeout
Finds records that: contain error, contain the exact phrase database connection, and do not contain timeout.
Search scope
The search scope defines which attributes Uptrace searches when filtering spans and logs. By default, it corresponds to your current grouping expression.
Default scopes
| Grouping expression | Search scope |
|---|---|
group by _group_id | _display_name |
group by service_name, host_name | service_name, host_name |
group by _group_id, service_name | _display_name, service_name |
Custom scopes
Use attribute:value to search a specific attribute regardless of grouping:
host_name:host1
service_name:"hello world"
Full-text index
If you configured a text index transformation, search across all indexed attributes using *:value:
*:hello
*:error|warning
-*:debug
The * scope searches the full-text index built from your selected attributes. Prefix with - to exclude.
Syntax reference
| Filter type | Syntax | Example |
|---|---|---|
| Word | word | error |
| Multiple words AND | word1 word2 | error database |
| Multiple words OR | word1|word2 | error|warning |
| Phrase | "phrase" | "connection timeout" |
| Negative | -term | -debug |
| Scoped | attribute:value | host_name:prod-server |
| Text index | *:value | *:hello |
Tips:
- All text searches are case-insensitive
- Word filters match partial words (
errmatcheserror) - Always quote values containing spaces or special characters
Related
- Querying spans and logs — full UQL reference for filters, grouping, and aggregations
- Transformations — configure a full-text index for
*:valuesearch