Skip to content

Report MCP error codes with server attribution - #29969

Merged
aibrahim-oai merged 2 commits into
mainfrom
codex/report-mcp-error-codes
Jun 25, 2026
Merged

Report MCP error codes with server attribution#29969
aibrahim-oai merged 2 commits into
mainfrom
codex/report-mcp-error-codes

Conversation

@aibrahim-oai

@aibrahim-oai aibrahim-oai commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Why

MCP error-code telemetry special-cased Codex Apps: its reported error codes were retained, while codes from every other MCP server were replaced with unknown. Error reporting should behave consistently for every MCP server. The server name already identifies where an error came from, so telemetry does not need a separate Codex Apps classification.

This follows up on #28976, which introduced MCP error-code telemetry.

What changed

  • Add the MCP server name to call, duration, and error metrics.
  • Retain bounded, sanitized tool error codes from every MCP server.
  • Remove McpErrorCodeSource and the Codex Apps ownership lookup from telemetry collection.
  • Use the same metric-tagging path for blocked, rejected, and executed MCP calls.

Test plan

  • Verify the complete metric tag set includes the sanitized MCP server name.
  • Verify error codes from ordinary MCP servers are retained, bounded, and sanitized.
  • Preserve coverage for request failures, tool-result failures, nested auth failures, and span attributes.

@aibrahim-oai
aibrahim-oai requested a review from a team as a code owner June 25, 2026 03:15
@aibrahim-oai aibrahim-oai changed the title Report MCP server error codes in telemetry Report MCP server error codes with server attribution Jun 25, 2026
@aibrahim-oai aibrahim-oai changed the title Report MCP server error codes with server attribution Report MCP error codes with server attribution Jun 25, 2026
@aibrahim-oai
aibrahim-oai merged commit cef5444 into main Jun 25, 2026
31 checks passed
@aibrahim-oai
aibrahim-oai deleted the codex/report-mcp-error-codes branch June 25, 2026 04:08
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants