Subchapter 49.14
references/search.mdMarkdown4 KBView on GitHub
Filter logs from the filter bar at the top of the logs page. Pick a field, choose an operator, and enter a value. Add as many filters as you need — they’re combined with AND.
There are four kinds of fields you can filter on:
severity_level, trace_id, and span_idservice.name, host.name, or k8s.container.nameuser_id, endpoint, or status_codeResource attributes identify the source of a log (the service, host, or container that emitted it). Attributes describe a specific log event. Both come from your OpenTelemetry instrumentation — the richer your structured logging (opens in a new tab), the more you can filter on.
To filter:
For example, filter service.name equals checkout-api to scope to one service, then add status_code equals 500 to narrow to failed requests.
The Logs group in the filter picker exposes three top-level fields. All three only support equals and not-equals operators.
trace, debug, info, warn, error, fatal.trace_id.For example, copy a trace_id from a trace URL and paste it into the filter to see every log emitted during that trace.
To search log bodies, pick the Message field from the filter bar. Message supports three operators, each with a negated variant for exclusion:
| Operator | Behavior |
|---|---|
| equals / doesn’t equal | Exact match. Case-sensitive. |
| contains / doesn’t contain | Substring match. Case-insensitive. The default. |
| matches regex / doesn’t match regex | RE2 regex. Case-insensitive. |
failed to connect – matches any log containing that substring, regardless of case.Health check OK – matches only logs whose body is exactly that string.timeout|refused|reset – matches logs mentioning any of those words (useful when you’d otherwise add multiple contains filters).healthcheck – exclude noisy healthcheck lines while keeping everything else.service.name filter with a Message contains to scope full-text search to one service.(timeout|refused|reset).user_id, endpoint, and status_code becomes an attribute you can filter on directly. See our logging best practices (opens in a new tab) for patterns that make logs easier to query.Ask a question
HelpfulCould be better