Current.sh provides a flexible query syntax that is used to control what logs are displayed. Because Current.sh is in beta, this syntax will grow as the beta continues with feedback from users as well.
Basics
Value Types
At present, integers and strings are the only available value types. That means float values can’t be searched for. This is a known issue and will be fixed soon.
Comparison: key=val
Use the syntax key=val
to display all log entries that have an attribute of key
with a value of val
. For instance, to show all log entries for the path /login
, you might use request.path=/login
.
Right now, when matching string values, current uses a fuzzy matcher to try and get as wide of a reach as possible. It’s possible this will change and =
will be a strict match and something like ~=
will be a fuzzy match.
Comparison: key!=val
This will match all log entries that do not have key
containing a value of val
.
Comparison: @key=val
This syntax will match all log entries that have a tag named key
with a value val
. An example of using this is @environment=production
to find all log entries generated by production components.
Comparison: key="val*"
This will match all log entries that have a key with a value starting with "val"
. You can use a *
anywhere in the query to match any text.
Comparison: @key="val*"
This will match all log entries that have a tag with a value starting with "val"
. You can use a *
anywhere in the query to match any text.
Composing: and
Comparisons can be strung together to narrow the log entries returned by putting and
between them. For example, to find all the requests to /
that errored out: request.path=/ and request.code=500
.
Composing: or
Or is not yet supported. Support will be released soon.