Emit plugin ID on MCP tool call analytics events (#27483)

MCP tool-call items already carry the runtime-resolved plugin owner, but
the analytics reducer dropped that field. Forwarding the existing value
provides direct attribution without downstream server-name inference.

## Summary

- emit `plugin_id` on `codex_mcp_tool_call_event` payloads
- preserve `null` for MCP calls without a plugin owner
- verify the serialized field through the MCP item lifecycle test

## Test

- `cd codex-rs && just test -p codex-analytics`
- `cd codex-rs && just fix -p codex-analytics`
- `cd codex-rs && just fmt`
This commit is contained in:
Chris Dong authored and GitHub committed 2026-06-11 09:55:53 -07:00
1 parent 1e5b87b4d7
commit df9dd22248
3 files changed
+37 -12

No files matched your search

+1
View File
@@ -633,6 +633,7 @@ pub(crate) struct CodexMcpToolCallEventParams {
pub(crate) mcp_server_name: String,
pub(crate) mcp_tool_name: String,
pub(crate) mcp_error_present: bool,
pub(crate) plugin_id: Option<String>,
}
#[derive(Serialize)]