mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
feat(tracing): tag app-server turn spans with turn_id (#15206)
So we can find and filter spans by `turn.id`. We do this for the `turn/start`, `turn/steer`, and `turn/interrupt` APIs.
This commit is contained in:
committed by
GitHub
Unverified
parent
60cd0cf75e
commit
668330acc1
@@ -6024,6 +6024,9 @@ impl CodexMessageProcessor {
|
||||
|
||||
match turn_id {
|
||||
Ok(turn_id) => {
|
||||
self.outgoing
|
||||
.record_request_turn_id(&request_id, &turn_id)
|
||||
.await;
|
||||
let turn = Turn {
|
||||
id: turn_id.clone(),
|
||||
items: vec![],
|
||||
@@ -6076,6 +6079,9 @@ impl CodexMessageProcessor {
|
||||
.await;
|
||||
return;
|
||||
}
|
||||
self.outgoing
|
||||
.record_request_turn_id(&request_id, ¶ms.expected_turn_id)
|
||||
.await;
|
||||
if let Err(error) = Self::validate_v2_input_limit(¶ms.input) {
|
||||
self.outgoing.send_error(request_id, error).await;
|
||||
return;
|
||||
@@ -6556,7 +6562,10 @@ impl CodexMessageProcessor {
|
||||
request_id: ConnectionRequestId,
|
||||
params: TurnInterruptParams,
|
||||
) {
|
||||
let TurnInterruptParams { thread_id, .. } = params;
|
||||
let TurnInterruptParams { thread_id, turn_id } = params;
|
||||
self.outgoing
|
||||
.record_request_turn_id(&request_id, &turn_id)
|
||||
.await;
|
||||
|
||||
let (thread_uuid, thread) = match self.load_thread(&thread_id).await {
|
||||
Ok(v) => v,
|
||||
|
||||
Reference in New Issue
Block a user