We are excited to announce the Dash0 beta launch. Sign up.

JSON Logs

Many systems provide structured logs (in JSON format), which allow you to add semantics to your log information. Dash0 analyzes and extracts relevant information from your JSON logs.

Introduction

Dash0 natively supports OpenTelemetry Logs, which provide log information based on its Semantic Conventions. Only a few solutions provide OpenTelemetry logs natively. However, many systems offer structured logs (in JSON format), which allow you to add semantics to your log information.

For other solutions not following OpenTelemetry's Symantec Conventions, the log data "level":"warn" would only be text. Dash0 is aware that the value warn in that field level makes the log record a warning and can treat it as such.

How it works

Dash0 parses all log records' bodies as a string containing a JSON data structure. Fields like severity and message can be extracted from that structure and used as semantic information.

Currently, the following log formats are supported:

Example

The log record:

json
0
{"level": "info","message": "Request to /","span_id":"93b6f3cf8ce8e712","timestamp": "2024-07-01T18:09:06.535Z","trace_flags": "01","trace_id":"027e383aa083bc5c4165a9c7abbe5694"}

has been read on the source system and forwarded to Dash0. The entire message would be displayed as the body of the log record.

When this log records is processed by Dash0, it converts the fields in the JSON payload to attributes and maps them to relevant context fields such as span_id and trace_id:

Screenshot JSON Log OverviewScreenshot JSON Log Source

Screenshot JSON Log Overview and JSON Log Source

Last updated: July 8, 2024