mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
feat: reduce span exposition (#10171)
This only avoids the creation of duplicates spans
This commit is contained in:
@@ -51,7 +51,12 @@ pub(crate) async fn handle_output_item_done(
|
||||
// The model emitted a tool call; log it, persist the item immediately, and queue the tool execution.
|
||||
Ok(Some(call)) => {
|
||||
let payload_preview = call.payload.log_payload().into_owned();
|
||||
tracing::info!("ToolCall: {} {}", call.tool_name, payload_preview);
|
||||
tracing::info!(
|
||||
thread_id = %ctx.sess.conversation_id,
|
||||
"ToolCall: {} {}",
|
||||
call.tool_name,
|
||||
payload_preview
|
||||
);
|
||||
|
||||
ctx.sess
|
||||
.record_conversation_items(&ctx.turn_context, std::slice::from_ref(&item))
|
||||
|
||||
@@ -14,7 +14,7 @@ use tokio::sync::Notify;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
use tokio_util::task::AbortOnDropHandle;
|
||||
use tracing::Instrument;
|
||||
use tracing::info_span;
|
||||
use tracing::Span;
|
||||
use tracing::trace;
|
||||
use tracing::warn;
|
||||
|
||||
@@ -132,8 +132,7 @@ impl Session {
|
||||
let ctx = Arc::clone(&turn_context);
|
||||
let task_for_run = Arc::clone(&task);
|
||||
let task_cancellation_token = cancellation_token.child_token();
|
||||
let thread_id = self.conversation_id;
|
||||
let session_span = info_span!("session_task", thread_id = %thread_id);
|
||||
let session_span = Span::current();
|
||||
tokio::spawn(
|
||||
async move {
|
||||
let ctx_for_finish = Arc::clone(&ctx);
|
||||
|
||||
Reference in New Issue
Block a user