Add logging when sandbox is assigned to conversation (#13143)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Graham Neubig
2026-03-02 17:36:49 -05:00
committed by GitHub
parent 8059c18b57
commit 01ef87aaaa
2 changed files with 15 additions and 0 deletions

View File

@@ -518,6 +518,17 @@ class LiveStatusAppConversationService(AppConversationServiceBase):
# Update the listener with sandbox info
task.status = AppConversationStartTaskStatus.WAITING_FOR_SANDBOX
task.sandbox_id = sandbox.id
# Log sandbox assignment for observability
conversation_id_str = (
str(task.request.conversation_id)
if task.request.conversation_id is not None
else 'unknown'
)
_logger.info(
f'Assigned sandbox {sandbox.id} to conversation {conversation_id_str}'
)
yield task
# Resume if paused

View File

@@ -515,6 +515,10 @@ class RemoteSandboxService(SandboxService):
# Hack - result doesn't contain this
runtime_data['pod_status'] = 'pending'
# Log runtime assignment for observability
runtime_id = runtime_data.get('runtime_id', 'unknown')
_logger.info(f'Started sandbox {sandbox_id} with runtime_id={runtime_id}')
return self._to_sandbox_info(stored_sandbox, runtime_data)
except httpx.HTTPError as e: