[codex-analytics] add steering metadata

This commit is contained in:
Roy Han
2026-04-07 17:54:37 -07:00
committed by rhan-oai
parent 32a0c52acd
commit 2f44170063
9 changed files with 818 additions and 58 deletions

View File

@@ -19,6 +19,7 @@ use crate::reducer::AnalyticsReducer;
use codex_app_server_protocol::ClientRequest;
use codex_app_server_protocol::ClientResponse;
use codex_app_server_protocol::InitializeParams;
use codex_app_server_protocol::JSONRPCErrorError;
use codex_app_server_protocol::RequestId;
use codex_app_server_protocol::ServerNotification;
use codex_login::AuthManager;
@@ -253,6 +254,19 @@ impl AnalyticsEventsClient {
});
}
pub fn track_error_response(
&self,
connection_id: u64,
request_id: RequestId,
error: JSONRPCErrorError,
) {
self.record_fact(AnalyticsFact::ErrorResponse {
connection_id,
request_id,
error,
});
}
pub fn track_notification(&self, notification: ServerNotification) {
self.record_fact(AnalyticsFact::Notification(Box::new(notification)));
}