Skip to content
Snippets Groups Projects
Commit d124c907 authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

sc-tracing: Only print events for whitelisted targets (#14487)


* sc-tracing: Only print events for whitelisted targets

We should only print events for whitelisted targets, otherwise we may run into some stack overflow
while printing the event.

* Update client/tracing/src/lib.rs

Co-authored-by: default avatarKoute <koute@users.noreply.github.com>

* Fix

---------

Co-authored-by: default avatarKoute <koute@users.noreply.github.com>
parent 6005d199
No related merge requests found
......@@ -328,6 +328,10 @@ where
}
fn on_event(&self, event: &Event<'_>, ctx: Context<S>) {
if !self.check_target(event.metadata().target(), &event.metadata().level()) {
return
}
let parent_id = event.parent().cloned().or_else(|| {
if event.is_contextual() {
ctx.lookup_current().map(|span| span.id())
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment