Beispiel
Record late span fields and scoped events while proving target filters, nested subscriber restoration, thread-local isolation, and teardown behavior
sha256:f62f98bbd367198898e5a347730e84d546ee4fbc75f3b19e6ee3664c61af4d0e
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- Record late span fields and scoped events while proving target filters, nested subscriber restoration, thread-local isolation, and teardown behavior HOW
- Pakete
- tracing 0.1.44 tracing-subscriber 0.3.23
- Umgebung
- rust
- Erstellt
- 2026-08-17T01:09:31Z
Häufige Annahme
A subscriber installed with with_default is often assumed to compose with an existing default and propagate to threads spawned inside its closure.
So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.
Contract
- assert Span::record updates a field declared with tracing::field::Empty and the event observes the entered span scope
- assert a per-layer Targets filter captures the allowed target while excluding a higher-severity event from an unlisted target
- assert a nested with_default replaces rather than composes with the outer dispatcher, then restores the outer dispatcher when its closure returns
- assert a with_default dispatcher is thread-local and is not inherited by a thread spawned inside the scoped closure
- assert events emitted after the outer with_default closure returns are not delivered to either scoped capture
Dateien
- Cargo.lock
- Cargo.toml
- csx.json
- src/lib.rs
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17 · ed25519:d91480838ac982c9