mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
add originator to otel (#10826)
This commit is contained in:
@@ -981,6 +981,7 @@ impl Session {
|
||||
auth.and_then(CodexAuth::get_account_id),
|
||||
auth.and_then(CodexAuth::get_account_email),
|
||||
auth_mode,
|
||||
crate::default_client::originator().value,
|
||||
config.otel.log_user_prompt,
|
||||
terminal::user_agent(),
|
||||
session_configuration.session_source.clone(),
|
||||
@@ -5775,6 +5776,7 @@ mod tests {
|
||||
None,
|
||||
Some("test@test.com".to_string()),
|
||||
Some(TelemetryAuthMode::Chatgpt),
|
||||
"test_originator".to_string(),
|
||||
false,
|
||||
"test".to_string(),
|
||||
session_source,
|
||||
|
||||
@@ -80,6 +80,7 @@ async fn responses_stream_includes_subagent_header_on_review() {
|
||||
None,
|
||||
Some("test@test.com".to_string()),
|
||||
Some(auth_mode),
|
||||
"test_originator".to_string(),
|
||||
false,
|
||||
"test".to_string(),
|
||||
session_source.clone(),
|
||||
@@ -183,6 +184,7 @@ async fn responses_stream_includes_subagent_header_on_other() {
|
||||
None,
|
||||
Some("test@test.com".to_string()),
|
||||
Some(auth_mode),
|
||||
"test_originator".to_string(),
|
||||
false,
|
||||
"test".to_string(),
|
||||
session_source.clone(),
|
||||
@@ -285,6 +287,7 @@ async fn responses_respects_model_info_overrides_from_config() {
|
||||
None,
|
||||
Some("test@test.com".to_string()),
|
||||
auth_mode,
|
||||
"test_originator".to_string(),
|
||||
false,
|
||||
"test".to_string(),
|
||||
session_source.clone(),
|
||||
|
||||
@@ -1259,6 +1259,7 @@ async fn azure_responses_request_includes_store_and_reasoning_ids() {
|
||||
None,
|
||||
Some("test@test.com".to_string()),
|
||||
auth_manager.auth_mode().map(TelemetryAuthMode::from),
|
||||
"test_originator".to_string(),
|
||||
false,
|
||||
"test".to_string(),
|
||||
SessionSource::Exec,
|
||||
|
||||
@@ -702,6 +702,7 @@ async fn websocket_harness_with_options(
|
||||
None,
|
||||
Some("test@test.com".to_string()),
|
||||
auth_manager.auth_mode().map(TelemetryAuthMode::from),
|
||||
"test_originator".to_string(),
|
||||
false,
|
||||
"test".to_string(),
|
||||
SessionSource::Exec,
|
||||
|
||||
Reference in New Issue
Block a user