zed: Fix session ID mismatching for workspace and telemetry (#43659)

I don't think this caused any problems for us but you never know ...

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth
2025-12-01 09:12:31 +01:00
committed by GitHub
parent 05764e8af7
commit 4e3aa0b1b6
2 changed files with 15 additions and 11 deletions
+12 -5
View File
@@ -287,14 +287,16 @@ pub fn main() {
let app = Application::new().with_assets(Assets);
let system_id = app.background_executor().block(system_id()).ok();
let installation_id = app.background_executor().block(installation_id()).ok();
let system_id = app.background_executor().spawn(system_id());
let installation_id = app.background_executor().spawn(installation_id());
let session_id = Uuid::new_v4().to_string();
let session = app.background_executor().block(Session::new());
let session = app
.background_executor()
.spawn(Session::new(session_id.clone()));
app.background_executor()
.spawn(crashes::init(InitCrashHandler {
session_id: session_id.clone(),
session_id,
zed_version: app_version.to_string(),
binary: "zed".to_string(),
release_channel: release_channel::RELEASE_CHANNEL_NAME.clone(),
@@ -505,11 +507,16 @@ pub fn main() {
debugger_ui::init(cx);
debugger_tools::init(cx);
client::init(&client, cx);
let system_id = cx.background_executor().block(system_id).ok();
let installation_id = cx.background_executor().block(installation_id).ok();
let session = cx.background_executor().block(session);
let telemetry = client.telemetry();
telemetry.start(
system_id.as_ref().map(|id| id.to_string()),
installation_id.as_ref().map(|id| id.to_string()),
session_id.clone(),
session.id().to_owned(),
cx,
);