Skip to content

Commit 5286934

Browse files
authored
feat: Add fastmcp tracing (#2695)
- 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.fastmcp` to control tracing and content capture separately from the MCP integration. - Add `wrapFastMCP()` for manual setup: ```ts import { wrapFastMCP } from "braintrust"; import * as fastmcp from "fastmcp"; const { FastMCP } = wrapFastMCP(fastmcp); // Add tracing to FastMCP sessions. ```
1 parent d2ccf19 commit 5286934

39 files changed

Lines changed: 12766 additions & 74 deletions

‎.changeset/add-fastmcp-tracing.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"braintrust": minor
3+
---
4+
5+
feat: Add `fastmcp` tracing

‎e2e/config/pr-comment-scenarios.json‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,29 @@
626626
}
627627
]
628628
},
629+
{
630+
"scenarioDirName": "fastmcp-instrumentation",
631+
"label": "FastMCP Instrumentation",
632+
"metadataScenario": "fastmcp-instrumentation",
633+
"variants": [
634+
{
635+
"variantKey": "fastmcp-v3",
636+
"label": "v3 pinned"
637+
},
638+
{
639+
"variantKey": "fastmcp-v3-latest",
640+
"label": "v3 latest"
641+
},
642+
{
643+
"variantKey": "fastmcp-v4",
644+
"label": "v4 pinned"
645+
},
646+
{
647+
"variantKey": "fastmcp-v4-latest",
648+
"label": "v4 latest"
649+
}
650+
]
651+
},
629652
{
630653
"scenarioDirName": "typesafe-instrumentation",
631654
"label": "TypeSafe Instrumentation",

0 commit comments

Comments
 (0)