Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(log): Trace parameters to align with profile #13538

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/cargo/core/compiler/fingerprint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,10 @@ pub use dirty_reason::DirtyReason;
/// transitively propagate throughout the dependency graph, it only forces this
/// one unit which is very unlikely to be what you want unless you're
/// exclusively talking about top-level units.
#[tracing::instrument(skip(build_runner, unit))]
#[tracing::instrument(
skip(build_runner, unit),
fields(package_id = %unit.pkg.package_id(), target = unit.target.name())
)]
pub fn prepare_target(
build_runner: &mut BuildRunner<'_, '_>,
unit: &Unit,
Expand Down
14 changes: 7 additions & 7 deletions src/cargo/core/global_cache_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ impl GlobalCacheTracker {
///
/// These orphaned files will be added to `delete_paths` so that the
/// caller can delete them.
#[tracing::instrument(skip_all)]
#[tracing::instrument(skip(conn, gctx, base, delete_paths))]
fn sync_db_with_files(
conn: &Connection,
now: Timestamp,
Expand Down Expand Up @@ -797,7 +797,7 @@ impl GlobalCacheTracker {
}

/// For parent tables, add any entries that are on disk but aren't tracked in the db.
#[tracing::instrument(skip_all)]
#[tracing::instrument(skip(conn, now, base_path))]
fn update_parent_for_missing_from_db(
conn: &Connection,
now: Timestamp,
Expand Down Expand Up @@ -825,7 +825,7 @@ impl GlobalCacheTracker {
///
/// This could happen for example if the user manually deleted the file or
/// any such scenario where the filesystem and db are out of sync.
#[tracing::instrument(skip_all)]
#[tracing::instrument(skip(conn, base_path))]
fn update_db_for_removed(
conn: &Connection,
parent_table_name: &str,
Expand Down Expand Up @@ -855,7 +855,7 @@ impl GlobalCacheTracker {
}

/// Removes database entries for any files that are not on disk for the parent tables.
#[tracing::instrument(skip_all)]
#[tracing::instrument(skip(conn, base_path, child_base_paths, delete_paths))]
fn update_db_parent_for_removed_from_disk(
conn: &Connection,
parent_table_name: &str,
Expand Down Expand Up @@ -893,7 +893,7 @@ impl GlobalCacheTracker {
/// Updates the database to add any `.crate` files that are currently
/// not tracked (such as when they are downloaded by an older version of
/// cargo).
#[tracing::instrument(skip_all)]
#[tracing::instrument(skip(conn, now, base_path))]
fn populate_untracked_crate(
conn: &Connection,
now: Timestamp,
Expand Down Expand Up @@ -928,7 +928,7 @@ impl GlobalCacheTracker {

/// Updates the database to add any files that are currently not tracked
/// (such as when they are downloaded by an older version of cargo).
#[tracing::instrument(skip_all)]
#[tracing::instrument(skip(conn, now, gctx, base_path, populate_size))]
fn populate_untracked(
conn: &Connection,
now: Timestamp,
Expand Down Expand Up @@ -994,7 +994,7 @@ impl GlobalCacheTracker {
/// size.
///
/// `update_db_for_removed` should be called before this is called.
#[tracing::instrument(skip_all)]
#[tracing::instrument(skip(conn, gctx, base_path))]
fn update_null_sizes(
conn: &Connection,
gctx: &GlobalContext,
Expand Down