-
Notifications
You must be signed in to change notification settings - Fork 844
Open
Description
Feature Request
In addition to flatten_event and with_span_list for the json formatter, consider:
flatten_spans: pull all fields of all spans up to the root json object, overriding fields hierarchically; useful to reduce unnecessary bloat in the fields for small applications that make extensive use of spans to provide contextwith_span_tail: only include thespansfield when more than onespanis present. when bothwith_current_spanandwith_span_listare enabled, you get the same span recorded twice, which is an eyesore and makes skimming logs more difficult.
Crates
tracing_subscriber
Motivation
Small applications that control most of their logging/tracing spans to provide context for individual log entries can have their outputs get fairly overwhelming due to the provided json formatting capabilities.
Proposal
Main drawback is added complexity.
Alternatives
A custom formatter, maybe? I'm not sure what that would entail. Or an adapter to help reorganize the spans into a coherent json record in a different way?
Metadata
Metadata
Assignees
Labels
No labels