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

Add session_id to crucible logs #1009

Merged
merged 1 commit into from
Oct 19, 2023
Merged
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
8 changes: 5 additions & 3 deletions upstairs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5358,7 +5358,6 @@ impl Upstairs {
});

let uuid = opt.id;
info!(log, "Crucible stats registered with UUID: {}", uuid);
let stats = UpStatOuter {
up_stat_wrap: Arc::new(std::sync::Mutex::new(UpCountStat::new(
uuid,
Expand All @@ -5371,11 +5370,15 @@ impl Upstairs {
};

let session_id = Uuid::new_v4();
let log = log.new(o!("session_id" => session_id.to_string()));
info!(log, "Crucible {} has session id: {}", uuid, session_id);
info!(log, "Upstairs opts: {}", opt);

info!(log, "Crucible stats registered with UUID: {}", uuid);
Arc::new(Upstairs {
active: Mutex::new(UpstairsState::default()),
uuid,
session_id: Uuid::new_v4(),
session_id,
generation: AtomicU64::new(gen),
guest,
downstairs: Mutex::new(Downstairs::new(log.clone(), ds_target)),
Expand Down Expand Up @@ -10282,7 +10285,6 @@ pub async fn up_main(
"Upstairs <-> Downstairs Message Version: {}", CRUCIBLE_MESSAGE_VERSION
);

info!(log, "Upstairs opts: {}", opt);
if let Some(rd) = region_def {
info!(log, "Using region definition {:?}", rd);
}
Expand Down
Loading