Skip to content

Commit

Permalink
fix(subscriber): ignore metadata that is not a span or event (tokio-r…
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhani committed May 24, 2024
1 parent a0d20fd commit 1a51455
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions console-subscriber/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,10 @@ where
S: Subscriber + for<'a> LookupSpan<'a>,
{
fn register_callsite(&self, meta: &'static Metadata<'static>) -> subscriber::Interest {
if !meta.is_span() && !meta.is_event() {
return subscriber::Interest::never()
}

let dropped = match (meta.name(), meta.target()) {
("runtime.spawn", _) | ("task", "tokio::task") => {
self.spawn_callsites.insert(meta);
Expand Down

0 comments on commit 1a51455

Please sign in to comment.