Skip to content

LPQL ‐ LogPort Query Language

Thiago Vasconcelos edited this page Jan 23, 2026 · 2 revisions

LPQL is a very simple DSL for querying logs in LogPort. It allows users to filter and search logs based on their properties and are translated directly into SQL statements.

Suported Fields

serviceName, level, message, hostname, environment, spanId, traceId, metadata, timestamp

Comparison Operators

Operator Description Example
= Equal (CASE SENSITIVE) level = error
!= Not equal environment != production
> Greater than (numeric or timestamp) timestamp > "2026-01-20T00:00:00"
< Less than (numeric or timestamp) timestamp < "2026-01-23T23:59:59"
>= Greater or equal timestamp >= "2026-01-22"
<= Less or equal timestamp <= "2026-01-22"
contains Checks if a string contains the value (CASE INSENSITIVE) message contains "failed login"

Values can be unquoted (single word) or quoted for multi-word strings:

message contains "user login failed"

Logical Operators

You can combine multiple conditions using and and or operators. However, do keep in mind that and operator has higher precedence than or. For example:

level = Error and serviceName = auth # returns any logs from 'auth' service that are error level
environment = production or level = warning # returns any production logs or warning logs

Clone this wiki locally