diff --git a/tracing-subscriber/src/layer.rs b/tracing-subscriber/src/layer.rs index 39b5679972..346d7890c8 100644 --- a/tracing-subscriber/src/layer.rs +++ b/tracing-subscriber/src/layer.rs @@ -736,6 +736,9 @@ where return outer; } + // The intention behind calling `inner.register_callsite()` before the if statement + // is to ensure that the inner subscriber is informed that the callsite exists + // regardless of the outer subscriber's filtering decision. let inner = self.inner.register_callsite(metadata); if outer.is_sometimes() { // if this interest is "sometimes", return "sometimes" to ensure that