Detailed JSON Matching Rules

Detailed description of JSON matching rules used in Dash0.

Message

The following keys are mapped to the log record body (first match wins):

  • @m
  • msg
  • message
  • log
  • output
  • MESSAGE

Log level

The following keys are mapped to the log record severity number (first match wins):

  • log.level
  • level
  • s
  • priority
  • @l
  • _logLevel

Severity mapping

The severity in the previously listed fields is mapped to the log record severity number as follows:

ValueSeverity number
finest1 (Trace)
t1 (Trace)
trace1 (Trace)
loglevel.trace1 (Trace)
ValueSeverity number
v5 (Debug)
verbose5 (Debug)
d5 (Debug)
d15 (Debug)
d26 (Debug2)
d37 (Debug3)
d48 (Debug4)
d58 (Debug4)
dbg5 (Debug)
debug5 (Debug)
finer5 (Debug)
fine6 (Debug2)
config7 (Debug3)
loglevel.debug5 (Debug)
ValueSeverity number
i9 (Info)
inf9 (Info)
info9 (Info)
information9 (Info)
informational9 (Info)
loglevel.information9 (Info)
notice10 (Info2)
ValueSeverity number
w13 (Warn)
wrn13 (Warn)
warn13 (Warn)
warning13 (Warn)
loglevel.warning13 (Warn)
ValueSeverity number
e17 (Error)
err17 (Error)
error17 (Error)
severe17 (Error)
loglevel.error17 (Error)
critical18 (Error2)
dpanic18 (Error2)
alert19 (Error3)
panic19 (Error3)
ValueSeverity number
f21 (Fatal)
fatal21 (Fatal)
emergency21 (Fatal)
loglevel.critical21 (Fatal)

Service name

The following keys are mapped to the service.name attribute (first match wins):

  • service_name
  • serviceName
  • otelServiceName

Timestamp

The following keys are mapped to the log record time (first match wins):

  • @timestamp
  • timestamp
  • @t
  • time
  • ts
  • date_time

Trace ID

The following keys are mapped to the Trace ID (first match wins):

  • trace_id
  • trace.id
  • traceId
  • @tr
  • otelTraceID

Note: Only hex-encoded strings with exactly 16 bytes (32 hex characters) are eligible as Trace ID.

Span ID

The following keys are mapped to the Span ID (first match wins):

  • span_id
  • span.id
  • spanId
  • @sp
  • otelSpanID

Note: Only hex-encoded strings with exactly 8 bytes (16 hex characters) are eligible as Span ID.

Trace sampling

If the otelTraceSampled key exists and has a boolean value, it will be used to set the trace flag SAMPLED accordingly.

journald (systemd)

If a journal entry is detected (includes a key named __CURSOR), the following keys are mapped to their corresponding log record attribute according to the OpenTelemetry Semantic Conventions:

KeyOpenTelemetry attribute
_HOSTNAMEhost.name
_MACHINE_IDhost.id
_PIDprocess.pid
_COMMprocess.executable.name
_EXEprocess.executable.path
_CMDprocess.command
_CMDLINEprocess.command_line
_UIDprocess.owner
_TRANSPORTlog.iostream
_SYSTEMD_CGROUPprocess.linux.cgroup

Additionally, the _SOURCE_REALTIME_TIMESTAMP key is mapped to the log record timestamp if it exists and has an integer number as value.

Severity mapping

The priority in the PRIORITY field of a journal entry is mapped to log record severity number as follows:

PrioritySeverity numberDescription
024 (Fatal4)Emergency: system is unusable
121 (Fatal)Alert: action must be taken immediately
218 (Error2)Critical: critical conditions
317 (Error)Error: error conditions
413 (Warn)Warning: warning conditions
510 (Info2)Notice: normal but significant condition
69 (Info)Informational: informational messages
75 (Debug)Debug: debug-level messages

pino

For pino, the following nested keys under the err key are mapped:

KeyOpenTelemetry attribute
err.messageexception.message
err.typeexception.type
err.stackexception.stacktrace

See also: https://getpino.io/#/docs/api?id=errors

Java (MDC)

The contents of the mdc key are lifted to the root level of log record attributes.

For example, mdc.loggerName would be available as an attribute with the key loggerName.

See also:

Last updated: July 22, 2025