extension: Another batch of updates for DAP extension API (#32809)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-06-16 21:34:05 +02:00 committed by GitHub
parent 4383fee3c1
commit 0f0ff40c6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 142 additions and 107 deletions

View file

@ -51,18 +51,26 @@ pub fn send_telemetry(scenario: &DebugScenario, location: TelemetrySpawnLocation
let Some(adapter) = cx.global::<DapRegistry>().adapter(&scenario.adapter) else {
return;
};
let kind = adapter
.request_kind(&scenario.config)
.ok()
.map(serde_json::to_value)
.and_then(Result::ok);
let dock = DebuggerSettings::get_global(cx).dock;
telemetry::event!(
"Debugger Session Started",
spawn_location = location,
with_build_task = scenario.build.is_some(),
kind = kind,
adapter = scenario.adapter.as_ref(),
dock_position = dock,
);
let config = scenario.config.clone();
let with_build_task = scenario.build.is_some();
let adapter_name = scenario.adapter.clone();
cx.spawn(async move |_| {
let kind = adapter
.request_kind(&config)
.await
.ok()
.map(serde_json::to_value)
.and_then(Result::ok);
telemetry::event!(
"Debugger Session Started",
spawn_location = location,
with_build_task = with_build_task,
kind = kind,
adapter = adapter_name,
dock_position = dock,
);
})
.detach();
}