Function export_completed_segments
pub fn export_completed_segments(
source: impl AsRef<Path>,
destination: impl AsRef<Path>,
) -> Result<ExportReport, Error>dial9 only.Expand description
Copy completed dial9 segments into a new diagnostics subdirectory.
The destination must not exist. This synchronous operation performs disk I/O; call it on a blocking worker, not a runtime worker or recorder callback. It neither claims nor deletes source segments and can be repeated into new destinations. Files evicted before they can be opened are reported.
Active segments and thread-local buffered events are not a snapshot of the
present instant. Finalize the recorder first when the tail is required.
A live export may be empty. The returned report and manifest.json describe
exactly what was copied. Other I/O errors are returned; a partial destination
is retained for inspection and has no completed manifest.
Copies the standard rotating writer’s trace.N.bin and trace.N.bin.gz
files. Applications using profiling sources must also collect any external
symbol artifacts their source requires.