pub fn layer<S>() -> Result<Option<impl Layer<S>>>where
S: Subscriber + for<'a> LookupSpan<'a>,Expand description
Builds the span layer when standard OTel environment variables opt in, or nothing when they do not. The layer only sees the runtime’s own spans, so a host’s log filters do not decide what gets exported.