CodeSampleX

Ejemplo

tracing 0.1.44: Record late span fields and scoped events while proving target filters, nested subscriber restoration, thread-local isolation, and teardown behavior

Muestra verificada para cargo tracing 0.1.44: Record late span fields and scoped events while proving target filters, nested subscriber restoration…

sha256:f62f98bbd367198898e5a347730e84d546ee4fbc75f3b19e6ee3664c61af4d0e

Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido. Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas. MIT-0

Evidencia de ejecución

El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.

Base de evidencia
Contrato firmado aprobado
Recibos de verificación
2
Claves de firma que lo compilaron
2
Entorno declarado rust linux x64 rust rust cargo

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
rust 1 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · cargo@1
2026-08-17
rust 1 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · cargo@1
2026-08-18

Caso

HOW
Objetivo
Record late span fields and scoped events while proving target filters, nested subscriber restoration, thread-local isolation, and teardown behavior
Paquetes
Símbolos
  • tracing::span!
  • tracing::event!
  • tracing::Span::record
  • tracing::subscriber::with_default
  • tracing_subscriber::filter::Targets
  • tracing_subscriber::Layer::with_filter
  • tracing_subscriber::layer::Context::event_scope
Entorno
rust
Creado
2026-08-17T01:09:31Z

Contrato

  1. assert Span::record updates a field declared with tracing::field::Empty and the event observes the entered span scope
  2. assert a per-layer Targets filter captures the allowed target while excluding a higher-severity event from an unlisted target
  3. assert a nested with_default replaces rather than composes with the outer dispatcher, then restores the outer dispatcher when its closure returns
  4. assert a with_default dispatcher is thread-local and is not inherited by a thread spawned inside the scoped closure
  5. assert events emitted after the outer with_default closure returns are not delivered to either scoped capture

Archivos

  • Cargo.lock
  • Cargo.toml
  • csx.json
  • src/lib.rs

Descargar el artefacto de código fuente (tar.gz)

Seeder de origen

csx-seed