Skip to content

fix: emit OTEL for hosted web search - #4

Open
bk-nvidia wants to merge 1 commit into
mainfrom
bk/otel-hosted-web-search
Open

fix: emit OTEL for hosted web search#4
bk-nvidia wants to merge 1 commit into
mainfrom
bk/otel-hosted-web-search

Conversation

@bk-nvidia

Copy link
Copy Markdown
Owner

Summary

  • emit a codex.tool_result OTEL row when hosted Responses API web search completes
  • track hosted web-search duration from response.output_item.added to response.output_item.done
  • keep hosted web-search query and result content out of OTEL by logging blank arguments and output

Why

Hosted web search is executed by the Responses API rather than the local tool registry, so it currently appears as a WebSearchCall response item but not as a local codex.tool_result. Sidecar consumers that only read OTEL cannot reliably count web-search tool executions without an OTEL event from this hosted path.

Tests

  • cargo test --manifest-path /private/tmp/openai-codex-latest/codex-rs/Cargo.toml -p codex-core response_stream_logs_hosted_web_search_tool_result_without_query_content
  • cargo test --manifest-path /private/tmp/openai-codex-latest/codex-rs/Cargo.toml -p codex-core response_stream_records_last_model_feedback_ids

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant