pub fn record_layer_with_failure<Registry, Sink>(
limits: FormatterLimits,
sink: Sink,
failure: impl Fn() + Send + Sync + 'static,
) -> (impl Layer<Registry> + Send + Sync, RecordStatus)Expand description
Prepare a complete-record layer without installing it or selecting events.
Apply [Layer::with_filter] to each layer independently: the public logger
can use its resolved [EnvFilter] while private evidence uses a fixed INFO
selector. A global public filter would also suppress private evidence.
Each layer owns its formatter limits, span fields and retained failure state.
Each live span retains a full span_bytes allocation per layer; two layers
with the default limits retain 128 KiB per span. Measurements before wiring
must account for layer count and cache versions held by in-flight records.
The completion, teardown and transport requirements of
record_subscriber_with_failure apply equally to this constructor.