mirror of
https://github.com/openai/codex.git
synced 2026-11-25 15:24:26 +00:00
define/emit some metrics for windows sandbox setup (#9573)
This should give us visibility into how users are using the elevated sandbox nux flow, and the timing of the elevated setup.
This commit is contained in:
1 parent
8179312ff5
commit
f81dd128a2
11 files changed
+273
-24
No files matched your search
@@ -89,6 +89,7 @@ use codex_core::protocol::WebSearchBeginEvent;
|
||||
use codex_core::protocol::WebSearchEndEvent;
|
||||
use codex_core::skills::model::SkillInterface;
|
||||
use codex_core::skills::model::SkillMetadata;
|
||||
use codex_otel::OtelManager;
|
||||
use codex_protocol::ThreadId;
|
||||
use codex_protocol::account::PlanType;
|
||||
use codex_protocol::approvals::ElicitationRequestEvent;
|
||||
@@ -359,6 +360,7 @@ pub(crate) struct ChatWidgetInit {
|
||||
pub(crate) feedback: codex_feedback::CodexFeedback,
|
||||
pub(crate) is_first_run: bool,
|
||||
pub(crate) model: Option<String>,
|
||||
pub(crate) otel_manager: OtelManager,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
@@ -413,6 +415,7 @@ pub(crate) struct ChatWidget {
|
||||
stored_collaboration_mode: CollaborationMode,
|
||||
auth_manager: Arc<AuthManager>,
|
||||
models_manager: Arc<ModelsManager>,
|
||||
otel_manager: OtelManager,
|
||||
session_header: SessionHeader,
|
||||
initial_user_message: Option<UserMessage>,
|
||||
token_info: Option<TokenUsageInfo>,
|
||||
@@ -1816,6 +1819,7 @@ impl ChatWidget {
|
||||
feedback,
|
||||
is_first_run,
|
||||
model,
|
||||
otel_manager,
|
||||
} = common;
|
||||
let model = model.filter(|m| !m.trim().is_empty());
|
||||
let mut config = config;
|
||||
@@ -1867,6 +1871,7 @@ impl ChatWidget {
|
||||
stored_collaboration_mode,
|
||||
auth_manager,
|
||||
models_manager,
|
||||
otel_manager,
|
||||
session_header: SessionHeader::new(model_for_header),
|
||||
initial_user_message,
|
||||
token_info: None,
|
||||
@@ -1934,6 +1939,7 @@ impl ChatWidget {
|
||||
models_manager,
|
||||
feedback,
|
||||
model,
|
||||
otel_manager,
|
||||
..
|
||||
} = common;
|
||||
let model = model.filter(|m| !m.trim().is_empty());
|
||||
@@ -1981,6 +1987,7 @@ impl ChatWidget {
|
||||
stored_collaboration_mode,
|
||||
auth_manager,
|
||||
models_manager,
|
||||
otel_manager,
|
||||
session_header: SessionHeader::new(header_model),
|
||||
initial_user_message,
|
||||
token_info: None,
|
||||
@@ -2296,11 +2303,17 @@ impl ChatWidget {
|
||||
return;
|
||||
}
|
||||
|
||||
self.otel_manager.counter(
|
||||
"codex.windows_sandbox.setup_elevated_sandbox_command",
|
||||
1,
|
||||
&[],
|
||||
);
|
||||
self.app_event_tx
|
||||
.send(AppEvent::BeginWindowsSandboxElevatedSetup { preset });
|
||||
}
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
{
|
||||
let _ = &self.otel_manager;
|
||||
// Not supported; on non-Windows this command should never be reachable.
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user