Chalk log search is composed of terms and operators. Terms can search the log message or a specific log field.

There are two types of terms:

  • A single term is one unquoted word, such as timeout or chalkruntime.
  • A phrase is text surrounded by double quotes, such as "hello world".

Use Boolean operators to combine terms. Operators are case sensitive and must be uppercase.

OperatorDescriptionExample
ANDIntersection: both terms must match. This is also the default between adjacent terms.timeout AND service:chalkruntime
ORUnion: either term can match.service:chalkruntime OR service:api
NOTExclusion: the following term or group must not match.service:api NOT status:error
-Short exclusion syntax.service:api -status:error

A term without a field searches the log message.

Search syntaxDescription
timeoutSearches message text for timeout.
"request failed"Searches message text for the phrase request failed.
timeout errorSearches message text for both timeout and error.
timeout OR errorSearches message text for either timeout or error.

If you need to search for a word that is also an operator, quote it:

"AND"

To search a specific log field, use field:value.

service:chalkruntime
status:error
resolver:my_resolver

Field search uses exact field names and values. The available fields depend on the log source, but common fields include:

FieldDescription
serviceService name. Also accepts service_name and ServiceName.
componentKubernetes or Chalk component.
statusStatus value when present in the log record.
severityLog level, such as debug, info, warn, or error.
resolverResolver name or FQN. Also accepts resolver_fqn.
query_nameNamed query.
operation_idOperation ID.
correlation_idCorrelation ID.
pod_nameKubernetes pod name.
appKubernetes app label.
resource_groupResource group.
deploymentDeployment ID. Also accepts deployment_id.
scaling_groupScaling group label.
containerContainer label.
trace_idTrace ID.
workflow_execution_idWorkflow execution ID.

Fields that contain punctuation can be quoted:

"k8s.pod.name":engine-grpc

Grouped Field Values

Put parentheses after a field name to apply that field to every unqualified value in the group.

service:(chalkruntime OR engine-grpc-mcyfr4j8u134)

The query above is equivalent to:

service:chalkruntime OR service:engine-grpc-mcyfr4j8u134

Groups can be nested and can include NOT:

service:((chalkruntime OR "engine grpc") AND NOT (proxy OR api))

If a grouped value has its own field, Chalk keeps that explicit field:

service:(chalkruntime OR component:api)

Grouping And Precedence

Use parentheses to control evaluation order:

(service:chalkruntime OR service:api) AND status:error

Without parentheses, the precedence order is:

  1. NOT and -
  2. AND and adjacent terms
  3. OR

For example:

"timeout" OR service:api AND NOT status:error

is evaluated as:

"timeout" OR (service:api AND NOT status:error)

Special Characters And Spaces

Use double quotes when a value contains spaces, colons, parentheses, or other punctuation:

message:"key:value"
resource_name:"hello world"
service:"engine grpc"

Inside a quoted value, escape a double quote with a backslash:

message:"failed with \"permission denied\""

Examples

Search queryDescription
service:chalkruntime status:errorLogs from chalkruntime with status error.
service:(chalkruntime OR api) -status:okLogs from either service, excluding successful records.
resolver:my_resolver "timed out"Resolver logs whose message contains timed out.
(component:engine OR component:api) AND severity:errorError logs from either component.
service:(NOT (proxy OR api)) timeoutLogs containing timeout from services other than proxy or api.

Current Limits

Chalk log search does not currently support Datadog-only syntax such as @attribute prefixes, numeric ranges like [400 TO 499], CIDR(), calculated fields, or existence queries such as field:*.