Skip to main content

Module tracing_layer

Module tracing_layer 

Source
Expand description

tracing_subscriber::Layer that intercepts events emitted inside a job_id-tagged span and republishes them as Event::Log for that job. Off-span events have job_id: None and only land in the daemon log file (handled by the wrapping fmt layer).

Structs§

JobIdAttachmentInstaller
JobScopedLogLayer

Constants§

JOB_ID_FIELD
Span field name carrying the job id. The worker sets this when entering each job’s span. Pass the numeric value directly for the most reliable path: tracing::info_span!("job", job_id = job.0). The %-formatter (Display) is also handled but requires a successful parse from the formatted string.