How to remove span name in log message? #2424
Unanswered
notinmybackyaard
asked this question in
Q&A
Replies: 1 comment
-
You can use a filter on your fmt-layer, for example a filter_fn which filters out span events for that layer. I.e.: tracing_subscriber::registry()
.with(format_layer.with_filter(filter::filter_fn(move |meta| {
!meta.is_span() || include_span_info
})))
.with(env_filter)
.init(); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
Would you tell me how to setup tracing config in my situation?
I like to use tracing crate with log and flame feature in my program.
And I want to profile span events with flame, but don't want to print span name in log message..
Here's my code below
Expected Log:
2022-12-23T04:08:31.298650Z INFO Log
Actual Log:
2022-12-23T04:08:31.298650Z INFO SpanForFlame: Log
Beta Was this translation helpful? Give feedback.
All reactions