Trace turn context creation and realtime state checks (#40017)

## What changed

- Add trace-level `turn_context.make` instrumentation around turn context
  construction.
- Add a trace-level `realtime_conversation.running_state` span around realtime
  conversation state checks.
- Skip recording function arguments in both spans.

GitOrigin-RevId: f0b905e75eb487432f56a2efdd65972f5322555d
This commit is contained in:
malsamiri-oai
2026-08-21 21:34:53 +00:00
committed by copyberry
parent e6a3877e95
commit be6ebb1f6d
2 changed files with 6 additions and 0 deletions
@@ -503,6 +503,11 @@ impl RealtimeConversationManager {
self.mode_instructions.lock().await.clone()
}
#[tracing::instrument(
name = "realtime_conversation.running_state",
level = "trace",
skip_all
)]
pub(crate) async fn running_state(&self) -> Option<()> {
let state = self.state.lock().await;
state
@@ -616,6 +616,7 @@ impl Session {
}
#[allow(clippy::too_many_arguments)]
#[instrument(name = "turn_context.make", level = "trace", skip_all)]
pub(crate) fn make_turn_context(
thread_id: ThreadId,
session_id: SessionId,