[codex][otel] propagate user email in otel events (#5223)

include user email into otel events for proper user-level attribution in
case of workspace setup
This commit is contained in:
Anton Panasenko
2025-10-15 17:53:33 -07:00
committed by GitHub
parent 5fa7844ad7
commit c146585cdb
9 changed files with 29 additions and 2 deletions

View File

@@ -135,6 +135,10 @@ impl CodexAuth {
self.get_current_token_data().and_then(|t| t.account_id)
}
pub fn get_account_email(&self) -> Option<String> {
self.get_current_token_data().and_then(|t| t.id_token.email)
}
pub(crate) fn get_plan_type(&self) -> Option<PlanType> {
self.get_current_token_data()
.and_then(|t| t.id_token.chatgpt_plan_type)