1 use tracing_core::{metadata::Metadata, span, subscriber::Subscriber, Event}; 2 3 pub struct TestSubscriberA; 4 impl Subscriber for TestSubscriberA { enabled(&self, _: &Metadata<'_>) -> bool5 fn enabled(&self, _: &Metadata<'_>) -> bool { 6 true 7 } new_span(&self, _: &span::Attributes<'_>) -> span::Id8 fn new_span(&self, _: &span::Attributes<'_>) -> span::Id { 9 span::Id::from_u64(1) 10 } record(&self, _: &span::Id, _: &span::Record<'_>)11 fn record(&self, _: &span::Id, _: &span::Record<'_>) {} record_follows_from(&self, _: &span::Id, _: &span::Id)12 fn record_follows_from(&self, _: &span::Id, _: &span::Id) {} event(&self, _: &Event<'_>)13 fn event(&self, _: &Event<'_>) {} enter(&self, _: &span::Id)14 fn enter(&self, _: &span::Id) {} exit(&self, _: &span::Id)15 fn exit(&self, _: &span::Id) {} 16 } 17 pub struct TestSubscriberB; 18 impl Subscriber for TestSubscriberB { enabled(&self, _: &Metadata<'_>) -> bool19 fn enabled(&self, _: &Metadata<'_>) -> bool { 20 true 21 } new_span(&self, _: &span::Attributes<'_>) -> span::Id22 fn new_span(&self, _: &span::Attributes<'_>) -> span::Id { 23 span::Id::from_u64(1) 24 } record(&self, _: &span::Id, _: &span::Record<'_>)25 fn record(&self, _: &span::Id, _: &span::Record<'_>) {} record_follows_from(&self, _: &span::Id, _: &span::Id)26 fn record_follows_from(&self, _: &span::Id, _: &span::Id) {} event(&self, _: &Event<'_>)27 fn event(&self, _: &Event<'_>) {} enter(&self, _: &span::Id)28 fn enter(&self, _: &span::Id) {} exit(&self, _: &span::Id)29 fn exit(&self, _: &span::Id) {} 30 } 31