tracing-flat-json
A simple tracing_subscriber::Layer emitting newline-delimited JSON, with
all event and span fields flattened onto the top level JSON object. Similar
to combining the json-subscriber options with_flattened_event and
with_top_level_flattened_span_list, without the caveats about duplicate
fields noted in the documentation for those options.
Usage
use *;
default
.with
.init;
Feature Flags
tracing-log: Handlelogevents emitted bytracing-log. Enabled by default.tracing-opentelemetry: Outputs thetrace_idadded to spans bytracing-opentelemetry. May not work when compiled with multiple versions oftracing-opentelemetryin the same executable.
Output Format
Included:
- timestamp (RFC3339 UTC)
- level
trace_id(with featuretracing-opentelemetry)code.file.pathcode.line.number- event message
- event fields, source code order
- parent span fields, source code order, latest span first, root span last
Excluded:
- span names
targetspan_id- duplicate fields (only latest value for each field name)