[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

@@ -445,6 +445,7 @@ impl Session {
config.model.as_str(),
config.model_family.slug.as_str(),
auth_manager.auth().and_then(|a| a.get_account_id()),
auth_manager.auth().and_then(|a| a.get_account_email()),
auth_manager.auth().map(|a| a.mode),
config.otel.log_user_prompt,
terminal::user_agent(),
@@ -2744,6 +2745,7 @@ mod tests {
config.model.as_str(),
config.model_family.slug.as_str(),
None,
Some("test@test.com".to_string()),
Some(AuthMode::ChatGPT),
false,
"test".to_string(),