Repository navigation
feat: Add fastmcp tracing - #2695
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db46e91499
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
| if (integrations.fastmcp !== false) { | ||
| this.fastMCPPlugin = new FastMCPPlugin( | ||
| typeof integrations.fastmcp === "object" ? integrations.fastmcp : {}, | ||
| ); | ||
| this.fastMCPPlugin.enable(); |
There was a problem hiding this comment.
Make fastmcp:false suppress fallback MCP tracing
When a user sets integrations.fastmcp: false while leaving the default mcp integration enabled, this condition disables only FastMCPPlugin; FastMCP 3/4 still uses @modelcontextprotocol/sdk, whose separately enabled MCPPlugin instruments the same server protocol. Consequently FastMCP requests can still produce MCP spans—and use MCP's default content capture—despite the explicit FastMCP opt-out. The new tests cover mcp: false and both integrations enabled, but not this configuration, so the advertised independent FastMCP tracing/content control is ineffective for users who otherwise need MCP instrumentation.
Useful? React with 👍 / 👎.
…-34f92c6f8f # Conflicts: # js/src/auto-instrumentations/configs/all.ts # js/src/exports.ts # js/src/instrumentation/braintrust-plugin.ts # js/src/instrumentation/config.ts # js/src/instrumentation/plugins/mcp-interceptors.ts
Add automatic tracing for FastMCP 3.35+ and 4.x servers, including stateless HTTP sessions.
Record tool calls, resource reads, prompts, notifications, and errors in Braintrust.
Use
integrations.fastmcpto control tracing and content capture separately from the MCP integration.Add
wrapFastMCP()for manual setup: