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:

text
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:

text
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:

text
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:

text
an error has occurred when executing a select query
select query

But does not match:

text
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

text
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 expressionSearch scope
group by _group_id_display_name
group by service_name, host_nameservice_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:

text
host_name:host1
service_name:"hello world"

Full-text index

If you configured a text index transformation, search across all indexed attributes using *:value:

text
*:hello
*:error|warning
-*:debug

The * scope searches the full-text index built from your selected attributes. Prefix with - to exclude.

Syntax reference

Filter typeSyntaxExample
Wordworderror
Multiple words ANDword1 word2error database
Multiple words ORword1|word2error|warning
Phrase"phrase""connection timeout"
Negative-term-debug
Scopedattribute:valuehost_name:prod-server
Text index*:value*:hello

Tips:

  • All text searches are case-insensitive
  • Word filters match partial words (err matches error)
  • Always quote values containing spaces or special characters