Capture synchronously, then persist outside the subscriber callback. This avoids blocking/re-entering the async service runtime from tracing's on_event.
| 89 | // Capture synchronously, then persist outside the subscriber callback. This |
| 90 | // avoids blocking/re-entering the async service runtime from tracing's on_event. |
| 91 | struct HookLogLayer(Arc<Mutex<Option<SessionLogEvent>>>); |
| 92 | impl<S: Subscriber> Layer<S> for HookLogLayer { |
| 93 | fn on_event(&self, event: &Event<'_>, _: Context<'_, S>) { |
| 94 | if event.metadata().target() != "atomic::hook" { |