Skip to content

Commit

Permalink
add missing span.entered(), use span.in_scope
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Mar 22, 2024
1 parent abc6683 commit 8b19841
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/docbuilder/rustwide_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,11 @@ impl RustwideBuilder {
// fill up disk space.
// This also prevents having multiple builders using the same rustwide workspace,
// which we don't do. Currently our separate builders use a separate rustwide workspace.
{
let _span = info_span!("purge_all_build_dirs").entered();
info_span!("purge_all_build_dirs").in_scope(|| {
self.workspace
.purge_all_build_dirs()
.map_err(FailureError::compat)?;
}
.map_err(FailureError::compat)
})?;

let mut build_dir = self.workspace.build_dir(&format!("{name}-{version}"));

Expand Down
4 changes: 2 additions & 2 deletions src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ impl AsyncStorage {

let mut zip_content = {
let _span =
info_span!("create_zip_archive", %archive_path, root_dir=%root_dir.display());
info_span!("create_zip_archive", %archive_path, root_dir=%root_dir.display()).entered();

let options = zip::write::FileOptions::default()
.compression_method(zip::CompressionMethod::Bzip2);
Expand All @@ -427,7 +427,7 @@ impl AsyncStorage {
let remote_index_path = format!("{}.index", &archive_path);
let alg = CompressionAlgorithm::default();
let compressed_index_content = {
let _span = info_span!("create_archive_index", %remote_index_path);
let _span = info_span!("create_archive_index", %remote_index_path).entered();

fs::create_dir_all(&temp_dir)?;
let local_index_path =
Expand Down

0 comments on commit 8b19841

Please sign in to comment.