From db46e91499b97a3e9fe231a857e2d0c60361ccf3 Mon Sep 17 00:00:00 2001 From: lforst <8118419+lforst@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:33:39 +0000 Subject: [PATCH 1/2] feat: Add `fastmcp` tracing --- e2e/config/pr-comment-scenarios.json | 23 + ...astmcp-v3-latest-no-content.span-tree.json | 630 ++++++ ...fastmcp-v3-latest-no-content.span-tree.txt | 534 ++++++ .../fastmcp-v3-latest.span-tree.json | 742 +++++++ .../fastmcp-v3-latest.span-tree.txt | 646 +++++++ .../fastmcp-v3-no-content.span-tree.json | 630 ++++++ .../fastmcp-v3-no-content.span-tree.txt | 534 ++++++ .../__snapshots__/fastmcp-v3.span-tree.json | 742 +++++++ .../__snapshots__/fastmcp-v3.span-tree.txt | 646 +++++++ ...astmcp-v4-latest-no-content.span-tree.json | 630 ++++++ ...fastmcp-v4-latest-no-content.span-tree.txt | 534 ++++++ .../fastmcp-v4-latest.span-tree.json | 742 +++++++ .../fastmcp-v4-latest.span-tree.txt | 646 +++++++ .../fastmcp-v4-no-content.span-tree.json | 630 ++++++ .../fastmcp-v4-no-content.span-tree.txt | 534 ++++++ .../__snapshots__/fastmcp-v4.span-tree.json | 742 +++++++ .../__snapshots__/fastmcp-v4.span-tree.txt | 646 +++++++ .../fastmcp-instrumentation/configure.mjs | 20 + .../fastmcp-instrumentation/package.json | 26 + .../fastmcp-instrumentation/pnpm-lock.yaml | 1700 +++++++++++++++++ .../fastmcp-instrumentation/scenario.mjs | 135 ++ .../fastmcp-instrumentation/scenario.test.ts | 188 ++ js/src/auto-instrumentations/configs/all.ts | 5 + .../auto-instrumentations/configs/fastmcp.ts | 15 + js/src/exports.ts | 1 + js/src/instrumentation/braintrust-plugin.ts | 14 + js/src/instrumentation/config.ts | 4 + .../plugins/fastmcp-interceptors.ts | 11 + .../instrumentation/plugins/fastmcp-plugin.ts | 35 + .../plugins/mcp-interceptors.ts | 43 +- js/src/instrumentation/plugins/mcp-plugin.ts | 74 +- .../plugins/mcp-tracing-plugin.ts | 86 + js/src/instrumentation/plugins/mcp-tracing.ts | 9 +- js/src/span-origin.ts | 1 + js/src/vendor-sdk-types/fastmcp.ts | 11 + js/src/wrappers/fastmcp.test.ts | 167 ++ js/src/wrappers/fastmcp.ts | 49 + .../auto-instrumentations/fastmcp.test.ts | 49 + 38 files changed, 12789 insertions(+), 85 deletions(-) create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest-no-content.span-tree.json create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest-no-content.span-tree.txt create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest.span-tree.json create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest.span-tree.txt create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-no-content.span-tree.json create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-no-content.span-tree.txt create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3.span-tree.json create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3.span-tree.txt create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest-no-content.span-tree.json create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest-no-content.span-tree.txt create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest.span-tree.json create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest.span-tree.txt create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-no-content.span-tree.json create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-no-content.span-tree.txt create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4.span-tree.json create mode 100644 e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4.span-tree.txt create mode 100644 e2e/scenarios/fastmcp-instrumentation/configure.mjs create mode 100644 e2e/scenarios/fastmcp-instrumentation/package.json create mode 100644 e2e/scenarios/fastmcp-instrumentation/pnpm-lock.yaml create mode 100644 e2e/scenarios/fastmcp-instrumentation/scenario.mjs create mode 100644 e2e/scenarios/fastmcp-instrumentation/scenario.test.ts create mode 100644 js/src/auto-instrumentations/configs/fastmcp.ts create mode 100644 js/src/instrumentation/plugins/fastmcp-interceptors.ts create mode 100644 js/src/instrumentation/plugins/fastmcp-plugin.ts create mode 100644 js/src/instrumentation/plugins/mcp-tracing-plugin.ts create mode 100644 js/src/vendor-sdk-types/fastmcp.ts create mode 100644 js/src/wrappers/fastmcp.test.ts create mode 100644 js/src/wrappers/fastmcp.ts create mode 100644 js/tests/auto-instrumentations/fastmcp.test.ts diff --git a/e2e/config/pr-comment-scenarios.json b/e2e/config/pr-comment-scenarios.json index 5f2101f01..323070709 100644 --- a/e2e/config/pr-comment-scenarios.json +++ b/e2e/config/pr-comment-scenarios.json @@ -615,6 +615,29 @@ } ] }, + { + "scenarioDirName": "fastmcp-instrumentation", + "label": "FastMCP Instrumentation", + "metadataScenario": "fastmcp-instrumentation", + "variants": [ + { + "variantKey": "fastmcp-v3", + "label": "v3 pinned" + }, + { + "variantKey": "fastmcp-v3-latest", + "label": "v3 latest" + }, + { + "variantKey": "fastmcp-v4", + "label": "v4 pinned" + }, + { + "variantKey": "fastmcp-v4-latest", + "label": "v4 latest" + } + ] + }, { "scenarioDirName": "typesafe-instrumentation", "label": "TypeSafe Instrumentation", diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest-no-content.span-tree.json b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest-no-content.span-tree.json new file mode 100644 index 000000000..977064ba8 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest-no-content.span-tree.json @@ -0,0 +1,630 @@ +{ + "span_tree": [ + { + "name": "fastmcp-instrumentation-root", + "type": "task", + "children": [ + { + "name": "fastmcp-session", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/list", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Tool returned an error result", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "resources/read", + "mcp.protocol.version": "", + "mcp.resource.uri": "notes://forecast", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "prompts/get", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "ping", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "fastmcp-stateless", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.method.name": "tools/list", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Tool returned an error result", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.method.name": "resources/read", + "mcp.resource.uri": "notes://forecast", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.method.name": "prompts/get", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest-no-content.span-tree.txt b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest-no-content.span-tree.txt new file mode 100644 index 000000000..216ec80e6 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest-no-content.span-tree.txt @@ -0,0 +1,534 @@ +span_tree: +└── fastmcp-instrumentation-root [task] + metadata: { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── fastmcp-session + │ metadata: { + │ "operation": "mcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ ├── initialize [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "0", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "initialize", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── notifications/initialized [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.lifecycle.phase": "initialization_complete", + │ │ "mcp.method.name": "notifications/initialized", + │ │ "mcp.notification.direction": "incoming", + │ │ "mcp.protocol.ready": 1, + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/list [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "1", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/list", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_weather [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_weather", + │ │ "jsonrpc.request.id": "2", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ │ └── weather-lookup + │ │ metadata: { + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_alerts [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "error.type": "tool_error", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_alerts", + │ │ "jsonrpc.request.id": "3", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ error: "Tool returned an error result" + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call render_map [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "render_map", + │ │ "jsonrpc.request.id": "4", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── resources/read [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "5", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "resources/read", + │ │ "mcp.protocol.version": "", + │ │ "mcp.resource.uri": "notes://forecast", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── prompts/get forecast [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.prompt.name": "forecast", + │ │ "jsonrpc.request.id": "6", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "prompts/get", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ └── ping [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "7", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "ping", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "mcp.session.id": "", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── fastmcp-stateless + metadata: { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── initialize [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "0", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "initialize", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── notifications/initialized [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "mcp.lifecycle.phase": "initialization_complete", + │ "mcp.method.name": "notifications/initialized", + │ "mcp.notification.direction": "incoming", + │ "mcp.protocol.ready": 1, + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/list [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "1", + │ "mcp.method.name": "tools/list", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_weather [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_weather", + │ "jsonrpc.request.id": "2", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ └── weather-lookup + │ metadata: { + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_alerts [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "error.type": "tool_error", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_alerts", + │ "jsonrpc.request.id": "3", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ error: "Tool returned an error result" + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call render_map [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "render_map", + │ "jsonrpc.request.id": "4", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── resources/read [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "5", + │ "mcp.method.name": "resources/read", + │ "mcp.resource.uri": "notes://forecast", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── prompts/get forecast [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.prompt.name": "forecast", + │ "jsonrpc.request.id": "6", + │ "mcp.method.name": "prompts/get", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── ping [function] + metadata: { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest.span-tree.json b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest.span-tree.json new file mode 100644 index 000000000..3d525ab21 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest.span-tree.json @@ -0,0 +1,742 @@ +{ + "span_tree": [ + { + "name": "fastmcp-instrumentation-root", + "type": "task", + "children": [ + { + "name": "fastmcp-session", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/list", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "input": { + "city": "Vienna" + }, + "output": { + "content": [ + { + "text": "Sunny in Vienna", + "type": "text" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "text": "Alert service unavailable", + "type": "text" + } + ], + "isError": true + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Alert service unavailable", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "data": "", + "mimeType": "image/png", + "type": "image" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "input": { + "uri": "notes://forecast" + }, + "output": { + "contents": [ + { + "mimeType": "text/plain", + "name": "forecast-notes", + "text": "Bring an umbrella.", + "uri": "notes://forecast" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "resources/read", + "mcp.protocol.version": "", + "mcp.resource.uri": "notes://forecast", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "input": { + "city": "Vienna" + }, + "output": { + "messages": [ + { + "content": { + "text": "What is the forecast for Vienna?", + "type": "text" + }, + "role": "user" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "prompts/get", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "ping", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "fastmcp-stateless", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.method.name": "tools/list", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "input": { + "city": "Vienna" + }, + "output": { + "content": [ + { + "text": "Sunny in Vienna", + "type": "text" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "text": "Alert service unavailable", + "type": "text" + } + ], + "isError": true + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Alert service unavailable", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "data": "", + "mimeType": "image/png", + "type": "image" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "input": { + "uri": "notes://forecast" + }, + "output": { + "contents": [ + { + "mimeType": "text/plain", + "name": "forecast-notes", + "text": "Bring an umbrella.", + "uri": "notes://forecast" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.method.name": "resources/read", + "mcp.resource.uri": "notes://forecast", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "input": { + "city": "Vienna" + }, + "output": { + "messages": [ + { + "content": { + "text": "What is the forecast for Vienna?", + "type": "text" + }, + "role": "user" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.method.name": "prompts/get", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest.span-tree.txt b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest.span-tree.txt new file mode 100644 index 000000000..dfd43afda --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-latest.span-tree.txt @@ -0,0 +1,646 @@ +span_tree: +└── fastmcp-instrumentation-root [task] + metadata: { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── fastmcp-session + │ metadata: { + │ "operation": "mcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ ├── initialize [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "0", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "initialize", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── notifications/initialized [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.lifecycle.phase": "initialization_complete", + │ │ "mcp.method.name": "notifications/initialized", + │ │ "mcp.notification.direction": "incoming", + │ │ "mcp.protocol.ready": 1, + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/list [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "1", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/list", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_weather [tool] + │ │ input: { + │ │ "city": "Vienna" + │ │ } + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "text": "Sunny in Vienna", + │ │ "type": "text" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_weather", + │ │ "jsonrpc.request.id": "2", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ │ └── weather-lookup + │ │ metadata: { + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_alerts [tool] + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "text": "Alert service unavailable", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "isError": true + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "error.type": "tool_error", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_alerts", + │ │ "jsonrpc.request.id": "3", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ error: "Alert service unavailable" + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call render_map [tool] + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "data": "", + │ │ "mimeType": "image/png", + │ │ "type": "image" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "render_map", + │ │ "jsonrpc.request.id": "4", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── resources/read [function] + │ │ input: { + │ │ "uri": "notes://forecast" + │ │ } + │ │ output: { + │ │ "contents": [ + │ │ { + │ │ "mimeType": "text/plain", + │ │ "name": "forecast-notes", + │ │ "text": "Bring an umbrella.", + │ │ "uri": "notes://forecast" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "5", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "resources/read", + │ │ "mcp.protocol.version": "", + │ │ "mcp.resource.uri": "notes://forecast", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── prompts/get forecast [function] + │ │ input: { + │ │ "city": "Vienna" + │ │ } + │ │ output: { + │ │ "messages": [ + │ │ { + │ │ "content": { + │ │ "text": "What is the forecast for Vienna?", + │ │ "type": "text" + │ │ }, + │ │ "role": "user" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.prompt.name": "forecast", + │ │ "jsonrpc.request.id": "6", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "prompts/get", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ └── ping [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "7", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "ping", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "mcp.session.id": "", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── fastmcp-stateless + metadata: { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── initialize [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "0", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "initialize", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── notifications/initialized [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "mcp.lifecycle.phase": "initialization_complete", + │ "mcp.method.name": "notifications/initialized", + │ "mcp.notification.direction": "incoming", + │ "mcp.protocol.ready": 1, + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/list [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "1", + │ "mcp.method.name": "tools/list", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_weather [tool] + │ input: { + │ "city": "Vienna" + │ } + │ output: { + │ "content": [ + │ { + │ "text": "Sunny in Vienna", + │ "type": "text" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_weather", + │ "jsonrpc.request.id": "2", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ └── weather-lookup + │ metadata: { + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_alerts [tool] + │ output: { + │ "content": [ + │ { + │ "text": "Alert service unavailable", + │ "type": "text" + │ } + │ ], + │ "isError": true + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "error.type": "tool_error", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_alerts", + │ "jsonrpc.request.id": "3", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ error: "Alert service unavailable" + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call render_map [tool] + │ output: { + │ "content": [ + │ { + │ "data": "", + │ "mimeType": "image/png", + │ "type": "image" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "render_map", + │ "jsonrpc.request.id": "4", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── resources/read [function] + │ input: { + │ "uri": "notes://forecast" + │ } + │ output: { + │ "contents": [ + │ { + │ "mimeType": "text/plain", + │ "name": "forecast-notes", + │ "text": "Bring an umbrella.", + │ "uri": "notes://forecast" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "5", + │ "mcp.method.name": "resources/read", + │ "mcp.resource.uri": "notes://forecast", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── prompts/get forecast [function] + │ input: { + │ "city": "Vienna" + │ } + │ output: { + │ "messages": [ + │ { + │ "content": { + │ "text": "What is the forecast for Vienna?", + │ "type": "text" + │ }, + │ "role": "user" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.prompt.name": "forecast", + │ "jsonrpc.request.id": "6", + │ "mcp.method.name": "prompts/get", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── ping [function] + metadata: { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-no-content.span-tree.json b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-no-content.span-tree.json new file mode 100644 index 000000000..977064ba8 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-no-content.span-tree.json @@ -0,0 +1,630 @@ +{ + "span_tree": [ + { + "name": "fastmcp-instrumentation-root", + "type": "task", + "children": [ + { + "name": "fastmcp-session", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/list", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Tool returned an error result", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "resources/read", + "mcp.protocol.version": "", + "mcp.resource.uri": "notes://forecast", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "prompts/get", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "ping", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "fastmcp-stateless", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.method.name": "tools/list", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Tool returned an error result", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.method.name": "resources/read", + "mcp.resource.uri": "notes://forecast", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.method.name": "prompts/get", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-no-content.span-tree.txt b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-no-content.span-tree.txt new file mode 100644 index 000000000..216ec80e6 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3-no-content.span-tree.txt @@ -0,0 +1,534 @@ +span_tree: +└── fastmcp-instrumentation-root [task] + metadata: { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── fastmcp-session + │ metadata: { + │ "operation": "mcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ ├── initialize [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "0", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "initialize", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── notifications/initialized [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.lifecycle.phase": "initialization_complete", + │ │ "mcp.method.name": "notifications/initialized", + │ │ "mcp.notification.direction": "incoming", + │ │ "mcp.protocol.ready": 1, + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/list [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "1", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/list", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_weather [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_weather", + │ │ "jsonrpc.request.id": "2", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ │ └── weather-lookup + │ │ metadata: { + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_alerts [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "error.type": "tool_error", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_alerts", + │ │ "jsonrpc.request.id": "3", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ error: "Tool returned an error result" + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call render_map [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "render_map", + │ │ "jsonrpc.request.id": "4", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── resources/read [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "5", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "resources/read", + │ │ "mcp.protocol.version": "", + │ │ "mcp.resource.uri": "notes://forecast", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── prompts/get forecast [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.prompt.name": "forecast", + │ │ "jsonrpc.request.id": "6", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "prompts/get", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ └── ping [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "7", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "ping", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "mcp.session.id": "", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── fastmcp-stateless + metadata: { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── initialize [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "0", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "initialize", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── notifications/initialized [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "mcp.lifecycle.phase": "initialization_complete", + │ "mcp.method.name": "notifications/initialized", + │ "mcp.notification.direction": "incoming", + │ "mcp.protocol.ready": 1, + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/list [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "1", + │ "mcp.method.name": "tools/list", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_weather [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_weather", + │ "jsonrpc.request.id": "2", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ └── weather-lookup + │ metadata: { + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_alerts [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "error.type": "tool_error", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_alerts", + │ "jsonrpc.request.id": "3", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ error: "Tool returned an error result" + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call render_map [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "render_map", + │ "jsonrpc.request.id": "4", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── resources/read [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "5", + │ "mcp.method.name": "resources/read", + │ "mcp.resource.uri": "notes://forecast", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── prompts/get forecast [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.prompt.name": "forecast", + │ "jsonrpc.request.id": "6", + │ "mcp.method.name": "prompts/get", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── ping [function] + metadata: { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3.span-tree.json b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3.span-tree.json new file mode 100644 index 000000000..3d525ab21 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3.span-tree.json @@ -0,0 +1,742 @@ +{ + "span_tree": [ + { + "name": "fastmcp-instrumentation-root", + "type": "task", + "children": [ + { + "name": "fastmcp-session", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/list", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "input": { + "city": "Vienna" + }, + "output": { + "content": [ + { + "text": "Sunny in Vienna", + "type": "text" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "text": "Alert service unavailable", + "type": "text" + } + ], + "isError": true + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Alert service unavailable", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "data": "", + "mimeType": "image/png", + "type": "image" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "input": { + "uri": "notes://forecast" + }, + "output": { + "contents": [ + { + "mimeType": "text/plain", + "name": "forecast-notes", + "text": "Bring an umbrella.", + "uri": "notes://forecast" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "resources/read", + "mcp.protocol.version": "", + "mcp.resource.uri": "notes://forecast", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "input": { + "city": "Vienna" + }, + "output": { + "messages": [ + { + "content": { + "text": "What is the forecast for Vienna?", + "type": "text" + }, + "role": "user" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "prompts/get", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "ping", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "fastmcp-stateless", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.method.name": "tools/list", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "input": { + "city": "Vienna" + }, + "output": { + "content": [ + { + "text": "Sunny in Vienna", + "type": "text" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "text": "Alert service unavailable", + "type": "text" + } + ], + "isError": true + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Alert service unavailable", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "data": "", + "mimeType": "image/png", + "type": "image" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "input": { + "uri": "notes://forecast" + }, + "output": { + "contents": [ + { + "mimeType": "text/plain", + "name": "forecast-notes", + "text": "Bring an umbrella.", + "uri": "notes://forecast" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.method.name": "resources/read", + "mcp.resource.uri": "notes://forecast", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "input": { + "city": "Vienna" + }, + "output": { + "messages": [ + { + "content": { + "text": "What is the forecast for Vienna?", + "type": "text" + }, + "role": "user" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.method.name": "prompts/get", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3.span-tree.txt b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3.span-tree.txt new file mode 100644 index 000000000..dfd43afda --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v3.span-tree.txt @@ -0,0 +1,646 @@ +span_tree: +└── fastmcp-instrumentation-root [task] + metadata: { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── fastmcp-session + │ metadata: { + │ "operation": "mcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ ├── initialize [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "0", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "initialize", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── notifications/initialized [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.lifecycle.phase": "initialization_complete", + │ │ "mcp.method.name": "notifications/initialized", + │ │ "mcp.notification.direction": "incoming", + │ │ "mcp.protocol.ready": 1, + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/list [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "1", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/list", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_weather [tool] + │ │ input: { + │ │ "city": "Vienna" + │ │ } + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "text": "Sunny in Vienna", + │ │ "type": "text" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_weather", + │ │ "jsonrpc.request.id": "2", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ │ └── weather-lookup + │ │ metadata: { + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_alerts [tool] + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "text": "Alert service unavailable", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "isError": true + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "error.type": "tool_error", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_alerts", + │ │ "jsonrpc.request.id": "3", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ error: "Alert service unavailable" + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call render_map [tool] + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "data": "", + │ │ "mimeType": "image/png", + │ │ "type": "image" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "render_map", + │ │ "jsonrpc.request.id": "4", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── resources/read [function] + │ │ input: { + │ │ "uri": "notes://forecast" + │ │ } + │ │ output: { + │ │ "contents": [ + │ │ { + │ │ "mimeType": "text/plain", + │ │ "name": "forecast-notes", + │ │ "text": "Bring an umbrella.", + │ │ "uri": "notes://forecast" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "5", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "resources/read", + │ │ "mcp.protocol.version": "", + │ │ "mcp.resource.uri": "notes://forecast", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── prompts/get forecast [function] + │ │ input: { + │ │ "city": "Vienna" + │ │ } + │ │ output: { + │ │ "messages": [ + │ │ { + │ │ "content": { + │ │ "text": "What is the forecast for Vienna?", + │ │ "type": "text" + │ │ }, + │ │ "role": "user" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.prompt.name": "forecast", + │ │ "jsonrpc.request.id": "6", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "prompts/get", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ └── ping [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "7", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "ping", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "mcp.session.id": "", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── fastmcp-stateless + metadata: { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── initialize [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "0", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "initialize", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── notifications/initialized [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "mcp.lifecycle.phase": "initialization_complete", + │ "mcp.method.name": "notifications/initialized", + │ "mcp.notification.direction": "incoming", + │ "mcp.protocol.ready": 1, + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/list [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "1", + │ "mcp.method.name": "tools/list", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_weather [tool] + │ input: { + │ "city": "Vienna" + │ } + │ output: { + │ "content": [ + │ { + │ "text": "Sunny in Vienna", + │ "type": "text" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_weather", + │ "jsonrpc.request.id": "2", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ └── weather-lookup + │ metadata: { + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_alerts [tool] + │ output: { + │ "content": [ + │ { + │ "text": "Alert service unavailable", + │ "type": "text" + │ } + │ ], + │ "isError": true + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "error.type": "tool_error", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_alerts", + │ "jsonrpc.request.id": "3", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ error: "Alert service unavailable" + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call render_map [tool] + │ output: { + │ "content": [ + │ { + │ "data": "", + │ "mimeType": "image/png", + │ "type": "image" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "render_map", + │ "jsonrpc.request.id": "4", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── resources/read [function] + │ input: { + │ "uri": "notes://forecast" + │ } + │ output: { + │ "contents": [ + │ { + │ "mimeType": "text/plain", + │ "name": "forecast-notes", + │ "text": "Bring an umbrella.", + │ "uri": "notes://forecast" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "5", + │ "mcp.method.name": "resources/read", + │ "mcp.resource.uri": "notes://forecast", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── prompts/get forecast [function] + │ input: { + │ "city": "Vienna" + │ } + │ output: { + │ "messages": [ + │ { + │ "content": { + │ "text": "What is the forecast for Vienna?", + │ "type": "text" + │ }, + │ "role": "user" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.prompt.name": "forecast", + │ "jsonrpc.request.id": "6", + │ "mcp.method.name": "prompts/get", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── ping [function] + metadata: { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest-no-content.span-tree.json b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest-no-content.span-tree.json new file mode 100644 index 000000000..977064ba8 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest-no-content.span-tree.json @@ -0,0 +1,630 @@ +{ + "span_tree": [ + { + "name": "fastmcp-instrumentation-root", + "type": "task", + "children": [ + { + "name": "fastmcp-session", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/list", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Tool returned an error result", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "resources/read", + "mcp.protocol.version": "", + "mcp.resource.uri": "notes://forecast", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "prompts/get", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "ping", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "fastmcp-stateless", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.method.name": "tools/list", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Tool returned an error result", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.method.name": "resources/read", + "mcp.resource.uri": "notes://forecast", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.method.name": "prompts/get", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest-no-content.span-tree.txt b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest-no-content.span-tree.txt new file mode 100644 index 000000000..216ec80e6 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest-no-content.span-tree.txt @@ -0,0 +1,534 @@ +span_tree: +└── fastmcp-instrumentation-root [task] + metadata: { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── fastmcp-session + │ metadata: { + │ "operation": "mcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ ├── initialize [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "0", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "initialize", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── notifications/initialized [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.lifecycle.phase": "initialization_complete", + │ │ "mcp.method.name": "notifications/initialized", + │ │ "mcp.notification.direction": "incoming", + │ │ "mcp.protocol.ready": 1, + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/list [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "1", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/list", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_weather [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_weather", + │ │ "jsonrpc.request.id": "2", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ │ └── weather-lookup + │ │ metadata: { + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_alerts [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "error.type": "tool_error", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_alerts", + │ │ "jsonrpc.request.id": "3", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ error: "Tool returned an error result" + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call render_map [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "render_map", + │ │ "jsonrpc.request.id": "4", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── resources/read [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "5", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "resources/read", + │ │ "mcp.protocol.version": "", + │ │ "mcp.resource.uri": "notes://forecast", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── prompts/get forecast [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.prompt.name": "forecast", + │ │ "jsonrpc.request.id": "6", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "prompts/get", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ └── ping [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "7", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "ping", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "mcp.session.id": "", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── fastmcp-stateless + metadata: { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── initialize [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "0", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "initialize", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── notifications/initialized [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "mcp.lifecycle.phase": "initialization_complete", + │ "mcp.method.name": "notifications/initialized", + │ "mcp.notification.direction": "incoming", + │ "mcp.protocol.ready": 1, + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/list [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "1", + │ "mcp.method.name": "tools/list", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_weather [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_weather", + │ "jsonrpc.request.id": "2", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ └── weather-lookup + │ metadata: { + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_alerts [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "error.type": "tool_error", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_alerts", + │ "jsonrpc.request.id": "3", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ error: "Tool returned an error result" + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call render_map [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "render_map", + │ "jsonrpc.request.id": "4", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── resources/read [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "5", + │ "mcp.method.name": "resources/read", + │ "mcp.resource.uri": "notes://forecast", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── prompts/get forecast [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.prompt.name": "forecast", + │ "jsonrpc.request.id": "6", + │ "mcp.method.name": "prompts/get", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── ping [function] + metadata: { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest.span-tree.json b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest.span-tree.json new file mode 100644 index 000000000..3d525ab21 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest.span-tree.json @@ -0,0 +1,742 @@ +{ + "span_tree": [ + { + "name": "fastmcp-instrumentation-root", + "type": "task", + "children": [ + { + "name": "fastmcp-session", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/list", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "input": { + "city": "Vienna" + }, + "output": { + "content": [ + { + "text": "Sunny in Vienna", + "type": "text" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "text": "Alert service unavailable", + "type": "text" + } + ], + "isError": true + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Alert service unavailable", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "data": "", + "mimeType": "image/png", + "type": "image" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "input": { + "uri": "notes://forecast" + }, + "output": { + "contents": [ + { + "mimeType": "text/plain", + "name": "forecast-notes", + "text": "Bring an umbrella.", + "uri": "notes://forecast" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "resources/read", + "mcp.protocol.version": "", + "mcp.resource.uri": "notes://forecast", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "input": { + "city": "Vienna" + }, + "output": { + "messages": [ + { + "content": { + "text": "What is the forecast for Vienna?", + "type": "text" + }, + "role": "user" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "prompts/get", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "ping", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "fastmcp-stateless", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.method.name": "tools/list", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "input": { + "city": "Vienna" + }, + "output": { + "content": [ + { + "text": "Sunny in Vienna", + "type": "text" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "text": "Alert service unavailable", + "type": "text" + } + ], + "isError": true + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Alert service unavailable", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "data": "", + "mimeType": "image/png", + "type": "image" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "input": { + "uri": "notes://forecast" + }, + "output": { + "contents": [ + { + "mimeType": "text/plain", + "name": "forecast-notes", + "text": "Bring an umbrella.", + "uri": "notes://forecast" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.method.name": "resources/read", + "mcp.resource.uri": "notes://forecast", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "input": { + "city": "Vienna" + }, + "output": { + "messages": [ + { + "content": { + "text": "What is the forecast for Vienna?", + "type": "text" + }, + "role": "user" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.method.name": "prompts/get", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest.span-tree.txt b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest.span-tree.txt new file mode 100644 index 000000000..dfd43afda --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-latest.span-tree.txt @@ -0,0 +1,646 @@ +span_tree: +└── fastmcp-instrumentation-root [task] + metadata: { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── fastmcp-session + │ metadata: { + │ "operation": "mcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ ├── initialize [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "0", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "initialize", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── notifications/initialized [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.lifecycle.phase": "initialization_complete", + │ │ "mcp.method.name": "notifications/initialized", + │ │ "mcp.notification.direction": "incoming", + │ │ "mcp.protocol.ready": 1, + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/list [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "1", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/list", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_weather [tool] + │ │ input: { + │ │ "city": "Vienna" + │ │ } + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "text": "Sunny in Vienna", + │ │ "type": "text" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_weather", + │ │ "jsonrpc.request.id": "2", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ │ └── weather-lookup + │ │ metadata: { + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_alerts [tool] + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "text": "Alert service unavailable", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "isError": true + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "error.type": "tool_error", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_alerts", + │ │ "jsonrpc.request.id": "3", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ error: "Alert service unavailable" + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call render_map [tool] + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "data": "", + │ │ "mimeType": "image/png", + │ │ "type": "image" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "render_map", + │ │ "jsonrpc.request.id": "4", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── resources/read [function] + │ │ input: { + │ │ "uri": "notes://forecast" + │ │ } + │ │ output: { + │ │ "contents": [ + │ │ { + │ │ "mimeType": "text/plain", + │ │ "name": "forecast-notes", + │ │ "text": "Bring an umbrella.", + │ │ "uri": "notes://forecast" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "5", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "resources/read", + │ │ "mcp.protocol.version": "", + │ │ "mcp.resource.uri": "notes://forecast", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── prompts/get forecast [function] + │ │ input: { + │ │ "city": "Vienna" + │ │ } + │ │ output: { + │ │ "messages": [ + │ │ { + │ │ "content": { + │ │ "text": "What is the forecast for Vienna?", + │ │ "type": "text" + │ │ }, + │ │ "role": "user" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.prompt.name": "forecast", + │ │ "jsonrpc.request.id": "6", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "prompts/get", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ └── ping [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "7", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "ping", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "mcp.session.id": "", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── fastmcp-stateless + metadata: { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── initialize [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "0", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "initialize", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── notifications/initialized [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "mcp.lifecycle.phase": "initialization_complete", + │ "mcp.method.name": "notifications/initialized", + │ "mcp.notification.direction": "incoming", + │ "mcp.protocol.ready": 1, + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/list [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "1", + │ "mcp.method.name": "tools/list", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_weather [tool] + │ input: { + │ "city": "Vienna" + │ } + │ output: { + │ "content": [ + │ { + │ "text": "Sunny in Vienna", + │ "type": "text" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_weather", + │ "jsonrpc.request.id": "2", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ └── weather-lookup + │ metadata: { + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_alerts [tool] + │ output: { + │ "content": [ + │ { + │ "text": "Alert service unavailable", + │ "type": "text" + │ } + │ ], + │ "isError": true + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "error.type": "tool_error", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_alerts", + │ "jsonrpc.request.id": "3", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ error: "Alert service unavailable" + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call render_map [tool] + │ output: { + │ "content": [ + │ { + │ "data": "", + │ "mimeType": "image/png", + │ "type": "image" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "render_map", + │ "jsonrpc.request.id": "4", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── resources/read [function] + │ input: { + │ "uri": "notes://forecast" + │ } + │ output: { + │ "contents": [ + │ { + │ "mimeType": "text/plain", + │ "name": "forecast-notes", + │ "text": "Bring an umbrella.", + │ "uri": "notes://forecast" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "5", + │ "mcp.method.name": "resources/read", + │ "mcp.resource.uri": "notes://forecast", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── prompts/get forecast [function] + │ input: { + │ "city": "Vienna" + │ } + │ output: { + │ "messages": [ + │ { + │ "content": { + │ "text": "What is the forecast for Vienna?", + │ "type": "text" + │ }, + │ "role": "user" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.prompt.name": "forecast", + │ "jsonrpc.request.id": "6", + │ "mcp.method.name": "prompts/get", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── ping [function] + metadata: { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-no-content.span-tree.json b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-no-content.span-tree.json new file mode 100644 index 000000000..977064ba8 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-no-content.span-tree.json @@ -0,0 +1,630 @@ +{ + "span_tree": [ + { + "name": "fastmcp-instrumentation-root", + "type": "task", + "children": [ + { + "name": "fastmcp-session", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/list", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Tool returned an error result", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "resources/read", + "mcp.protocol.version": "", + "mcp.resource.uri": "notes://forecast", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "prompts/get", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "ping", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "fastmcp-stateless", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.method.name": "tools/list", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Tool returned an error result", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.method.name": "resources/read", + "mcp.resource.uri": "notes://forecast", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.method.name": "prompts/get", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-no-content.span-tree.txt b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-no-content.span-tree.txt new file mode 100644 index 000000000..216ec80e6 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4-no-content.span-tree.txt @@ -0,0 +1,534 @@ +span_tree: +└── fastmcp-instrumentation-root [task] + metadata: { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── fastmcp-session + │ metadata: { + │ "operation": "mcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ ├── initialize [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "0", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "initialize", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── notifications/initialized [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.lifecycle.phase": "initialization_complete", + │ │ "mcp.method.name": "notifications/initialized", + │ │ "mcp.notification.direction": "incoming", + │ │ "mcp.protocol.ready": 1, + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/list [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "1", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/list", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_weather [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_weather", + │ │ "jsonrpc.request.id": "2", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ │ └── weather-lookup + │ │ metadata: { + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_alerts [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "error.type": "tool_error", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_alerts", + │ │ "jsonrpc.request.id": "3", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ error: "Tool returned an error result" + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call render_map [tool] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "render_map", + │ │ "jsonrpc.request.id": "4", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── resources/read [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "5", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "resources/read", + │ │ "mcp.protocol.version": "", + │ │ "mcp.resource.uri": "notes://forecast", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── prompts/get forecast [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.prompt.name": "forecast", + │ │ "jsonrpc.request.id": "6", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "prompts/get", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ └── ping [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "7", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "ping", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "mcp.session.id": "", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── fastmcp-stateless + metadata: { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── initialize [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "0", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "initialize", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── notifications/initialized [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "mcp.lifecycle.phase": "initialization_complete", + │ "mcp.method.name": "notifications/initialized", + │ "mcp.notification.direction": "incoming", + │ "mcp.protocol.ready": 1, + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/list [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "1", + │ "mcp.method.name": "tools/list", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_weather [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_weather", + │ "jsonrpc.request.id": "2", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ └── weather-lookup + │ metadata: { + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_alerts [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "error.type": "tool_error", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_alerts", + │ "jsonrpc.request.id": "3", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ error: "Tool returned an error result" + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call render_map [tool] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "render_map", + │ "jsonrpc.request.id": "4", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── resources/read [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "5", + │ "mcp.method.name": "resources/read", + │ "mcp.resource.uri": "notes://forecast", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── prompts/get forecast [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.prompt.name": "forecast", + │ "jsonrpc.request.id": "6", + │ "mcp.method.name": "prompts/get", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── ping [function] + metadata: { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4.span-tree.json b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4.span-tree.json new file mode 100644 index 000000000..3d525ab21 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4.span-tree.json @@ -0,0 +1,742 @@ +{ + "span_tree": [ + { + "name": "fastmcp-instrumentation-root", + "type": "task", + "children": [ + { + "name": "fastmcp-session", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/list", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "input": { + "city": "Vienna" + }, + "output": { + "content": [ + { + "text": "Sunny in Vienna", + "type": "text" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "text": "Alert service unavailable", + "type": "text" + } + ], + "isError": true + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Alert service unavailable", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "data": "", + "mimeType": "image/png", + "type": "image" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "tools/call", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "input": { + "uri": "notes://forecast" + }, + "output": { + "contents": [ + { + "mimeType": "text/plain", + "name": "forecast-notes", + "text": "Bring an umbrella.", + "uri": "notes://forecast" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "resources/read", + "mcp.protocol.version": "", + "mcp.resource.uri": "notes://forecast", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "input": { + "city": "Vienna" + }, + "output": { + "messages": [ + { + "content": { + "text": "What is the forecast for Vienna?", + "type": "text" + }, + "role": "user" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "prompts/get", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "ping", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "mcp.session.id": "", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "fastmcp-stateless", + "children": [ + { + "name": "initialize", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "0", + "mcp.client.name": "braintrust-e2e-client", + "mcp.client.version": "1.0.0", + "mcp.method.name": "initialize", + "mcp.protocol.version": "", + "mcp.server.name": "braintrust-e2e-fastmcp", + "mcp.server.version": "1.0.0", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "notifications/initialized", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "mcp.lifecycle.phase": "initialization_complete", + "mcp.method.name": "notifications/initialized", + "mcp.notification.direction": "incoming", + "mcp.protocol.ready": 1, + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/list", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "1", + "mcp.method.name": "tools/list", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_weather", + "type": "tool", + "children": [ + { + "name": "weather-lookup", + "children": [], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "input": { + "city": "Vienna" + }, + "output": { + "content": [ + { + "text": "Sunny in Vienna", + "type": "text" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "jsonrpc.request.id": "2", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call get_alerts", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "text": "Alert service unavailable", + "type": "text" + } + ], + "isError": true + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "error.type": "tool_error", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_alerts", + "jsonrpc.request.id": "3", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "error": "Alert service unavailable", + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "tools/call render_map", + "type": "tool", + "children": [], + "output": { + "content": [ + { + "data": "", + "mimeType": "image/png", + "type": "image" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "render_map", + "jsonrpc.request.id": "4", + "mcp.method.name": "tools/call", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "resources/read", + "type": "function", + "children": [], + "input": { + "uri": "notes://forecast" + }, + "output": { + "contents": [ + { + "mimeType": "text/plain", + "name": "forecast-notes", + "text": "Bring an umbrella.", + "uri": "notes://forecast" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "5", + "mcp.method.name": "resources/read", + "mcp.resource.uri": "notes://forecast", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "prompts/get forecast", + "type": "function", + "children": [], + "input": { + "city": "Vienna" + }, + "output": { + "messages": [ + { + "content": { + "text": "What is the forecast for Vienna?", + "type": "text" + }, + "role": "user" + } + ] + }, + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "gen_ai.prompt.name": "forecast", + "jsonrpc.request.id": "6", + "mcp.method.name": "prompts/get", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + }, + { + "name": "ping", + "type": "function", + "children": [], + "metadata": { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ], + "metadata": { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + }, + "metrics": { + "end": 0, + "start": 0 + }, + "context": { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4.span-tree.txt b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4.span-tree.txt new file mode 100644 index 000000000..dfd43afda --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/__snapshots__/fastmcp-v4.span-tree.txt @@ -0,0 +1,646 @@ +span_tree: +└── fastmcp-instrumentation-root [task] + metadata: { + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── fastmcp-session + │ metadata: { + │ "operation": "mcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ ├── initialize [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "0", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "initialize", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── notifications/initialized [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.lifecycle.phase": "initialization_complete", + │ │ "mcp.method.name": "notifications/initialized", + │ │ "mcp.notification.direction": "incoming", + │ │ "mcp.protocol.ready": 1, + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/list [function] + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "1", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/list", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_weather [tool] + │ │ input: { + │ │ "city": "Vienna" + │ │ } + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "text": "Sunny in Vienna", + │ │ "type": "text" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_weather", + │ │ "jsonrpc.request.id": "2", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ │ └── weather-lookup + │ │ metadata: { + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call get_alerts [tool] + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "text": "Alert service unavailable", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "isError": true + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "error.type": "tool_error", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "get_alerts", + │ │ "jsonrpc.request.id": "3", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ error: "Alert service unavailable" + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── tools/call render_map [tool] + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "data": "", + │ │ "mimeType": "image/png", + │ │ "type": "image" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.operation.name": "execute_tool", + │ │ "gen_ai.tool.name": "render_map", + │ │ "jsonrpc.request.id": "4", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "tools/call", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── resources/read [function] + │ │ input: { + │ │ "uri": "notes://forecast" + │ │ } + │ │ output: { + │ │ "contents": [ + │ │ { + │ │ "mimeType": "text/plain", + │ │ "name": "forecast-notes", + │ │ "text": "Bring an umbrella.", + │ │ "uri": "notes://forecast" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "jsonrpc.request.id": "5", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "resources/read", + │ │ "mcp.protocol.version": "", + │ │ "mcp.resource.uri": "notes://forecast", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ ├── prompts/get forecast [function] + │ │ input: { + │ │ "city": "Vienna" + │ │ } + │ │ output: { + │ │ "messages": [ + │ │ { + │ │ "content": { + │ │ "text": "What is the forecast for Vienna?", + │ │ "type": "text" + │ │ }, + │ │ "role": "user" + │ │ } + │ │ ] + │ │ } + │ │ metadata: { + │ │ "client.address": "127.0.0.1", + │ │ "client.port": "", + │ │ "gen_ai.prompt.name": "forecast", + │ │ "jsonrpc.request.id": "6", + │ │ "mcp.client.name": "braintrust-e2e-client", + │ │ "mcp.client.version": "1.0.0", + │ │ "mcp.method.name": "prompts/get", + │ │ "mcp.protocol.version": "", + │ │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ │ "mcp.server.version": "1.0.0", + │ │ "mcp.session.id": "", + │ │ "network.protocol.name": "http", + │ │ "network.protocol.version": "1.1", + │ │ "network.transport": "tcp", + │ │ "scenario": "fastmcp-instrumentation", + │ │ "testRunId": "" + │ │ } + │ │ metrics: { + │ │ "end": 0, + │ │ "start": 0 + │ │ } + │ │ context: { + │ │ "caller_filename": "", + │ │ "caller_functionname": "", + │ │ "caller_lineno": 0 + │ │ } + │ └── ping [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "7", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "ping", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "mcp.session.id": "", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── fastmcp-stateless + metadata: { + "operation": "mcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } + ├── initialize [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "0", + │ "mcp.client.name": "braintrust-e2e-client", + │ "mcp.client.version": "1.0.0", + │ "mcp.method.name": "initialize", + │ "mcp.protocol.version": "", + │ "mcp.server.name": "braintrust-e2e-fastmcp", + │ "mcp.server.version": "1.0.0", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── notifications/initialized [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "mcp.lifecycle.phase": "initialization_complete", + │ "mcp.method.name": "notifications/initialized", + │ "mcp.notification.direction": "incoming", + │ "mcp.protocol.ready": 1, + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/list [function] + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "1", + │ "mcp.method.name": "tools/list", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_weather [tool] + │ input: { + │ "city": "Vienna" + │ } + │ output: { + │ "content": [ + │ { + │ "text": "Sunny in Vienna", + │ "type": "text" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_weather", + │ "jsonrpc.request.id": "2", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + │ └── weather-lookup + │ metadata: { + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call get_alerts [tool] + │ output: { + │ "content": [ + │ { + │ "text": "Alert service unavailable", + │ "type": "text" + │ } + │ ], + │ "isError": true + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "error.type": "tool_error", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "get_alerts", + │ "jsonrpc.request.id": "3", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ error: "Alert service unavailable" + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── tools/call render_map [tool] + │ output: { + │ "content": [ + │ { + │ "data": "", + │ "mimeType": "image/png", + │ "type": "image" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.operation.name": "execute_tool", + │ "gen_ai.tool.name": "render_map", + │ "jsonrpc.request.id": "4", + │ "mcp.method.name": "tools/call", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── resources/read [function] + │ input: { + │ "uri": "notes://forecast" + │ } + │ output: { + │ "contents": [ + │ { + │ "mimeType": "text/plain", + │ "name": "forecast-notes", + │ "text": "Bring an umbrella.", + │ "uri": "notes://forecast" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "jsonrpc.request.id": "5", + │ "mcp.method.name": "resources/read", + │ "mcp.resource.uri": "notes://forecast", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + ├── prompts/get forecast [function] + │ input: { + │ "city": "Vienna" + │ } + │ output: { + │ "messages": [ + │ { + │ "content": { + │ "text": "What is the forecast for Vienna?", + │ "type": "text" + │ }, + │ "role": "user" + │ } + │ ] + │ } + │ metadata: { + │ "client.address": "127.0.0.1", + │ "client.port": "", + │ "gen_ai.prompt.name": "forecast", + │ "jsonrpc.request.id": "6", + │ "mcp.method.name": "prompts/get", + │ "network.protocol.name": "http", + │ "network.protocol.version": "1.1", + │ "network.transport": "tcp", + │ "scenario": "fastmcp-instrumentation", + │ "testRunId": "" + │ } + │ metrics: { + │ "end": 0, + │ "start": 0 + │ } + │ context: { + │ "caller_filename": "", + │ "caller_functionname": "", + │ "caller_lineno": 0 + │ } + └── ping [function] + metadata: { + "client.address": "127.0.0.1", + "client.port": "", + "jsonrpc.request.id": "7", + "mcp.method.name": "ping", + "network.protocol.name": "http", + "network.protocol.version": "1.1", + "network.transport": "tcp", + "scenario": "fastmcp-instrumentation", + "testRunId": "" + } + metrics: { + "end": 0, + "start": 0 + } + context: { + "caller_filename": "", + "caller_functionname": "", + "caller_lineno": 0 + } diff --git a/e2e/scenarios/fastmcp-instrumentation/configure.mjs b/e2e/scenarios/fastmcp-instrumentation/configure.mjs new file mode 100644 index 000000000..98852c776 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/configure.mjs @@ -0,0 +1,20 @@ +import { configureInstrumentation } from "braintrust/instrumentation"; + +configureInstrumentation({ + integrations: { + mcp: process.env.FASTMCP_MCP_ENABLED === "1", + fastmcp: { captureContent: process.env.MCP_CAPTURE_CONTENT === "1" }, + }, + spanCustomizers: [ + { + onSpanExport(data) { + data.metadata = { + ...data.metadata, + scenario: "fastmcp-instrumentation", + testRunId: process.env.BRAINTRUST_E2E_RUN_ID, + }; + return data; + }, + }, + ], +}); diff --git a/e2e/scenarios/fastmcp-instrumentation/package.json b/e2e/scenarios/fastmcp-instrumentation/package.json new file mode 100644 index 000000000..67f8f01c3 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/package.json @@ -0,0 +1,26 @@ +{ + "name": "@braintrust/e2e-fastmcp-instrumentation", + "private": true, + "braintrustScenario": { + "bump": { + "dependencies": { + "fastmcp-v3-latest": { + "package": "fastmcp", + "range": "3" + }, + "fastmcp-v4-latest": { + "package": "fastmcp", + "range": "4" + } + } + } + }, + "dependencies": { + "fastmcp-v3": "npm:fastmcp@3.35.0", + "fastmcp-v3-latest": "npm:fastmcp@3.35.0", + "fastmcp-v4": "npm:fastmcp@4.0.0", + "fastmcp-v4-latest": "npm:fastmcp@4.23.7", + "@modelcontextprotocol/sdk": "1.32.2", + "zod": "4.3.6" + } +} diff --git a/e2e/scenarios/fastmcp-instrumentation/pnpm-lock.yaml b/e2e/scenarios/fastmcp-instrumentation/pnpm-lock.yaml new file mode 100644 index 000000000..2fe0576f3 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/pnpm-lock.yaml @@ -0,0 +1,1700 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@modelcontextprotocol/sdk': + specifier: 1.32.2 + version: 1.32.2(zod@4.3.6) + fastmcp-v3: + specifier: npm:fastmcp@3.35.0 + version: fastmcp@3.35.0 + fastmcp-v3-latest: + specifier: npm:fastmcp@3.35.0 + version: fastmcp@3.35.0 + fastmcp-v4: + specifier: npm:fastmcp@4.0.0 + version: fastmcp@4.0.0 + fastmcp-v4-latest: + specifier: npm:fastmcp@4.23.7 + version: fastmcp@4.23.7(ajv-formats@3.0.1(ajv@8.20.0))(ajv@8.20.0)(openapi-types@12.1.3) + zod: + specifier: 4.3.6 + version: 4.3.6 + +packages: + + '@apidevtools/json-schema-ref-parser@16.0.5': + resolution: {integrity: sha512-z3LiEMqTP2FNu6u8bdUgBYErVuwMSZReOJy1MCEIB0BDHMoNgBtkciby32HOlcrfWwrOSzRU8YIsZ0CogYRuYQ==} + engines: {node: '>=22.19.0'} + peerDependencies: + '@types/json-schema': ^7.0.15 + + '@apidevtools/openapi-schemas@2.1.0': + resolution: {integrity: sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==} + engines: {node: '>=10'} + + '@apidevtools/swagger-methods@3.0.2': + resolution: {integrity: sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==} + + '@apidevtools/swagger-parser@13.1.0': + resolution: {integrity: sha512-dkCuqCWh5U7u0aurmmc/qvel2KeKDxHTwVtUdYonndIpD7mXV6AVaWNdvaja2HAy628z7FT/Qdz8sCgzwhgwKg==} + engines: {node: '>=22.19.0'} + peerDependencies: + openapi-types: '>=7' + + '@borewit/text-codec@0.2.3': + resolution: {integrity: sha512-49CycTz1aAZmvFcwkeFyhud1HUmRIB5Tabf7ALV+VA4Iu85MTfz2cUwzPagMFAdVBvrWdkCxG67I30tUwwpKsw==} + + '@hono/node-server@2.1.5': + resolution: {integrity: sha512-MgP/I06GdvsilDspMk/qmRzpk8LOUStP6jFAbSRi40W09DhoyUn+Mj7eyKICPqeYKybOjVFLVIAQzvu1bfIa7Q==} + engines: {node: '>=20'} + peerDependencies: + hono: ^4 || ^5.0.0-0 + + '@modelcontextprotocol/client@2.4.0': + resolution: {integrity: sha512-LgrD2OphHuG12vfKFKz6SOnq7bKHQmhGJIAYdD+MZBn2npHEyry6uD8zvktodtl5CQM85MO0anUyD9JwmUmxww==} + engines: {node: '>=20'} + + '@modelcontextprotocol/core@2.4.0': + resolution: {integrity: sha512-z8QBKqdfXLPzkLQuG4xp8hrVEMm1PZ1IgxMN2sMbJiFiAKOWXnAzogXn2W4aqIBlP1ea6U5yiqVquvUNM1Cj6Q==} + engines: {node: '>=20'} + + '@modelcontextprotocol/sdk@1.32.2': + resolution: {integrity: sha512-SWsVtH/0vULSQStoZ6xxH2K09Li8fXYTMC64ZeogCdpZ3XSi1eCPOByV1OpuJxuI3OcmHhosDWYyii07tpPsLw==} + engines: {node: '>=18'} + peerDependencies: + '@cfworker/json-schema': ^4.1.1 + zod: ^3.25 || ^4.0 + peerDependenciesMeta: + '@cfworker/json-schema': + optional: true + + '@modelcontextprotocol/server@2.4.0': + resolution: {integrity: sha512-rgR9yxSaAJ+bcsi/XroT/S2AfPiIWloXAnrdfYSCms9ivVju0ishu/wW0J21Ho6+ZOR1r7RyeRbjiRuF87ix5Q==} + engines: {node: '>=20'} + + '@sec-ant/readable-stream@0.4.1': + resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} + + '@sindresorhus/merge-streams@4.0.0': + resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} + engines: {node: '>=18'} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@tokenizer/inflate@0.4.1': + resolution: {integrity: sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==} + engines: {node: '>=18'} + + '@tokenizer/token@0.3.0': + resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + accepts@1.3.8: + resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} + engines: {node: '>= 0.6'} + + accepts@2.0.0: + resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} + engines: {node: '>= 0.6'} + + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + + ajv-draft-04@1.0.0: + resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} + peerDependencies: + ajv: ^8.5.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + + ansi-regex@6.5.0: + resolution: {integrity: sha512-zhvbbbdt1kbw7EJ9OQoxmQcuaNR9P5kTj7e/YdmOSU10aHWbycofJxA6jKfoEy3vlLdctOF9ZHaxLtmSm998wQ==} + engines: {node: '>=12'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + argparse@3.0.4: + resolution: {integrity: sha512-fwWK3Zq22l4XJJjx5mcBHGikIk+hJqO+32dPm0Jur7+rtG5x1scOjSfdT9ZKeWHPpsya/l0HHK4tDImBkTrtvA==} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + axios@1.21.0: + resolution: {integrity: sha512-YCzXMB53Q9PZBsh7yN7wtapit4WepwcHS2fP8QhGsBxSz5YtgYobV7GGlWlAJi+RxfU77GQTQi2DSLUma42EYA==} + + body-parser@2.4.0: + resolution: {integrity: sha512-Ifk1KcLrxaGt1occQagQNFNNOqRt1LFuehEnHHzB8Z6cRgIxRU1TBaiIsUiCdA+gy5PL7Y1IX31DNKkRmxtXjQ==} + engines: {node: '>=18'} + + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + + call-me-maybe@1.0.2: + resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} + + cliui@9.0.1: + resolution: {integrity: sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==} + engines: {node: '>=20'} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + + content-disposition@1.0.1: + resolution: {integrity: sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==} + engines: {node: '>=18'} + + content-disposition@2.0.1: + resolution: {integrity: sha512-e+H0ZXHSWYrENhQzw1LPuP4oF5MzVKmDU6d3hxlvaPEYLLg62MxtQNPRx4SYSuYJSBUgnQIG4HIN2tEtNv7Dog==} + engines: {node: '>=18'} + + content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + + content-type@2.1.0: + resolution: {integrity: sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==} + engines: {node: '>=18'} + + cookie-signature@1.2.2: + resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} + engines: {node: '>=6.6.0'} + + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + + cookies@0.9.2: + resolution: {integrity: sha512-8BIbcC6tPZMv2/PD4PrB3CtKks7LmAWhA7FRZK/6/b/WJ2RUz00KCga7gq50S4/RhZ22kxefRFGgsuts0v3eoA==} + engines: {node: '>= 0.8'} + + cors@2.8.6: + resolution: {integrity: sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==} + engines: {node: '>= 0.10'} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + deep-equal@1.0.1: + resolution: {integrity: sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + + delegates@1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + + depd@1.1.2: + resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} + engines: {node: '>= 0.6'} + + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + + destroy@1.2.0: + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + + emoji-regex@10.6.0: + resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} + + encodeurl@2.0.1: + resolution: {integrity: sha512-Ev/hIyePLZtpL98x562lvPtenrUfGr0lfaf44HFZ+hDEwso7ccV9QAZrEVLg0hxNAzygaAFxy2dYaAKKM0G06A==} + engines: {node: '>= 0.8'} + + end-of-stream@1.4.5: + resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + + etag@1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + + eventsource-parser@3.1.1: + resolution: {integrity: sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==} + engines: {node: '>=18.0.0'} + + eventsource@3.0.7: + resolution: {integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==} + engines: {node: '>=18.0.0'} + + execa@9.6.1: + resolution: {integrity: sha512-9Be3ZoN4LmYR90tUoVu2te2BsbzHfhJyfEiAVfz7N5/zv+jduIfLrV2xdQXOHbaD6KgpGdO9PRPM1Y4Q9QkPkA==} + engines: {node: ^18.19.0 || >=20.5.0} + + express-rate-limit@8.7.1: + resolution: {integrity: sha512-2FXbqkygil3mZiXzEtM0IjE/UBmBNot0J1GEVrJT4JbrvwOSoEtqtO+wHbiMQELWe1eNvHoYRg2dkjOid+6JkA==} + engines: {node: '>= 16'} + peerDependencies: + express: '>= 4.11' + + express@5.3.0: + resolution: {integrity: sha512-qCqy1xSoaugxOD4IVHb1ZWdkvCF2W3aE2okKouWj8VwJ+ztskSiXoBnCSJqfKT+cVPJhuJqe9YLbY425+Zh00g==} + engines: {node: '>= 18'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-uri@3.1.9: + resolution: {integrity: sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==} + + fastmcp@3.35.0: + resolution: {integrity: sha512-bcyAaVa3Zw5f4xighGg6fNNgEzZoP6tX/O+ZfS2lIhbEULWe/zUWG533JyFEUOjZT7EB+tiZW1ot4eWKmYJ6DA==} + hasBin: true + peerDependencies: + jose: ^5.0.0 + peerDependenciesMeta: + jose: + optional: true + + fastmcp@4.0.0: + resolution: {integrity: sha512-QGIvKVkjRLLiyn1JUHVDWkqPucJfMfGReaVxB2UzlOVs9NSfmg2f1hU9aNEcDd0804hMqrsxr62kN83XrNh00g==} + hasBin: true + peerDependencies: + jose: ^5.0.0 + peerDependenciesMeta: + jose: + optional: true + + fastmcp@4.23.7: + resolution: {integrity: sha512-yHV7VnaqQQihMzh9mfy1RayLCQ9qBGKcJVtvKAVu5If90ypBeRc7zRhvym0B22N9PNDuOSfSpVKbss7tqvEd8g==} + hasBin: true + peerDependencies: + ajv: ^8.0.0 + ajv-formats: ^3.0.0 + jose: ^5.0.0 || ^6.0.0 + peerDependenciesMeta: + ajv: + optional: true + ajv-formats: + optional: true + jose: + optional: true + + figures@6.1.0: + resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} + engines: {node: '>=18'} + + file-type@21.3.4: + resolution: {integrity: sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==} + engines: {node: '>=20'} + + finalhandler@2.1.1: + resolution: {integrity: sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==} + engines: {node: '>= 18.0.0'} + + follow-redirects@1.16.2: + resolution: {integrity: sha512-/kVP2U8z596Ia0gwFrwyIeo74ta5aVmSeU1FfAUMAmcEP5EP7zydmag3SLiN64NaRKef3lxsq7i/g7ltJQDGow==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + form-data@4.0.6: + resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} + engines: {node: '>= 6'} + + forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + + fresh@0.5.2: + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} + engines: {node: '>= 0.6'} + + fresh@2.0.0: + resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} + engines: {node: '>= 0.8'} + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + fuse.js@7.5.0: + resolution: {integrity: sha512-sQtrEfA+ez/3G0cCZecF70oqpCRttCexYUG4mUrtWL49ULUzUyxokt5kyqwtKzj1270RaKih+hcP3qLcumccow==} + engines: {node: '>=10'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-east-asian-width@1.7.0: + resolution: {integrity: sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==} + engines: {node: '>=18'} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + get-stream@9.0.1: + resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} + engines: {node: '>=18'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + hono@4.13.14: + resolution: {integrity: sha512-yhRLQ21U6qa9Hsu2N7Qcbh8tE+WKEcoErjIo56LeSGiGXGp9sA7UpE86Ui9uexb61KakiGwuHMn2QdV7w6i6kQ==} + engines: {node: '>=16.9.0'} + + http-assert@1.5.0: + resolution: {integrity: sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==} + engines: {node: '>= 0.8'} + + http-errors@1.8.1: + resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==} + engines: {node: '>= 0.6'} + + http-errors@2.0.1: + resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} + engines: {node: '>= 0.8'} + + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + + human-readable-ids@1.0.4: + resolution: {integrity: sha512-h1zwThTims8A/SpqFGWyTx+jG1+WRMJaEeZgbtPGrIpj2AZjsOgy8Y+iNzJ0yAyN669Q6F02EK66WMWcst+2FA==} + + human-signals@8.0.1: + resolution: {integrity: sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==} + engines: {node: '>=18.18.0'} + + iconv-lite@0.7.3: + resolution: {integrity: sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ip-address@10.7.5: + resolution: {integrity: sha512-t2v0rkILYv9WXmSL7TpAaU3HXgaFYOPUcH3QHgwQ++gpJuH3bqyMy4Fvt/DJCTKwzH3Cf+bAp5W/mFL39KPLzA==} + engines: {node: '>= 12'} + + ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + + is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + + is-promise@4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + + is-stream@4.0.1: + resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} + engines: {node: '>=18'} + + is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} + engines: {node: '>=18'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jose@6.2.14: + resolution: {integrity: sha512-3JasLuki1NRLQvY4wCoC37KZk4qxoBx2k2aFqLxT84IezqW0bkJKnNtxnZj/Fu1xsQivoc/lytxaRHJoGLjJ1A==} + + js-yaml@5.5.0: + resolution: {integrity: sha512-paNr4LFIFPjeeSmwNYdrb8FafLLG/Cr2Af3GjbsHJ5CxIjH4r0c2emlmRdAtpPAieP1gRVzk6buBbVP5gBMGAg==} + hasBin: true + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + json-schema-typed@8.0.2: + resolution: {integrity: sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==} + + keygrip@1.1.0: + resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==} + engines: {node: '>= 0.6'} + + knuth-shuffle@1.0.8: + resolution: {integrity: sha512-IdC4Hpp+mx53zTt6VAGsAtbGM0g4BV9fP8tTcviCosSwocHcRDw9uG5Rnv6wLWckF4r72qeXFoK9NkvV1gUJCQ==} + + koa-compose@4.1.0: + resolution: {integrity: sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==} + + koa-router@14.0.0: + resolution: {integrity: sha512-Ue8f/PRsLLNm6b7y+eS6xkqvsG2xH11d2VB1HPcfdfW6p5736kCHf2pXaq8q9XPQ01x0Dk7V/P5Il9pe+tGTxA==} + engines: {node: '>= 20'} + deprecated: 'Please use @koa/router instead, starting from v9! ' + + koa@3.2.1: + resolution: {integrity: sha512-e7IpWJrnanNUroVK2taAgMxoEZvHLXdQiNjeExSu/DEIWm83jaKGBgb7tLmu2rMYpA027qFB3iLR/k3AVpFRnA==} + engines: {node: '>= 18'} + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + mcp-proxy@6.7.21: + resolution: {integrity: sha512-btzC2YoQKgVc6mA8dElcmaX7nz20WcdteJRq8Je/9pufORT+fBikwIne1juyYvRNSLyTw4U2fjUuy9q82O+RaQ==} + hasBin: true + + media-typer@1.1.1: + resolution: {integrity: sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==} + engines: {node: '>= 0.8'} + + merge-descriptors@2.0.0: + resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} + engines: {node: '>=18'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-db@1.54.0: + resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mime-types@3.0.2: + resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==} + engines: {node: '>=18'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + negotiator@0.6.3: + resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} + engines: {node: '>= 0.6'} + + negotiator@1.1.0: + resolution: {integrity: sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==} + engines: {node: '>=18'} + + npm-run-path@6.0.0: + resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==} + engines: {node: '>=18'} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + + on-finished@2.4.2: + resolution: {integrity: sha512-ATWUv387i+nLD49EiDoOft5scf32Vsdz3ktrQJG9bi7jRFmaXTssvyvj1EmeKVVgvesbqUtvQQvaS2TpTukAZQ==} + engines: {node: '>= 0.8'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + openapi-types@12.1.3: + resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==} + + parse-ms@4.0.0: + resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} + engines: {node: '>=18'} + + parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + + path-to-regexp@8.4.2: + resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==} + + pipenet@1.4.3: + resolution: {integrity: sha512-cZB6xkS2chaUO1h4z2zw3GI0I/Mn3OSMiT9Gc90kbCiiiFFXxvYtE7KQTbeMEpjno1aN8m/03nzs172pjPQ6IQ==} + engines: {node: '>=22.0.0'} + hasBin: true + + pkce-challenge@5.0.1: + resolution: {integrity: sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==} + engines: {node: '>=16.20.0'} + + pretty-ms@9.3.1: + resolution: {integrity: sha512-HzMy3Geq23nVALD/M2LliU+F+M+gVNsvkQWWqeBZ8HDiCgzo6YPJ/Omrmtq24EFrIsk0a3EkQGEd7bDOo+IhGA==} + engines: {node: '>=18'} + + proxy-addr@2.0.8: + resolution: {integrity: sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==} + engines: {node: '>= 0.10'} + + proxy-from-env@2.1.0: + resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==} + engines: {node: '>=10'} + + pump@3.0.4: + resolution: {integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + qs@6.17.1: + resolution: {integrity: sha512-jd3COkaKVgGUW+ZHyEHCG9bH7RoaaiWuMgzsIBjUMVjLAaWGWpoUAVwljVvBHxRu/2qEHnadLGZrkutYUBPQJA==} + engines: {node: '>=0.6'} + + range-parser@1.3.0: + resolution: {integrity: sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==} + engines: {node: '>= 0.6'} + + raw-body@3.0.2: + resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==} + engines: {node: '>= 0.10'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + router@2.2.0: + resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} + engines: {node: '>= 18'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + send@1.2.1: + resolution: {integrity: sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==} + engines: {node: '>= 18'} + + serve-static@2.2.1: + resolution: {integrity: sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==} + engines: {node: '>= 18'} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.1: + resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} + engines: {node: '>= 0.4'} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + statuses@1.5.0: + resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} + engines: {node: '>= 0.6'} + + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} + engines: {node: '>= 0.8'} + + strict-event-emitter-types@2.0.0: + resolution: {integrity: sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==} + + string-width@7.2.0: + resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} + engines: {node: '>=18'} + + string-width@8.3.0: + resolution: {integrity: sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==} + engines: {node: '>=20'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + strip-final-newline@4.0.0: + resolution: {integrity: sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==} + engines: {node: '>=18'} + + strtok3@10.6.3: + resolution: {integrity: sha512-MD8mENgyXMr2mDaDfzP3RWYDSyYQxIIou7HhCiCJiBekrsoDtUG0id3vYnjDfY9ndOEbazFXe13Qw6u/1AB8ew==} + engines: {node: '>=18'} + + tldjs@2.3.2: + resolution: {integrity: sha512-EORDwFMSZKrHPUVDhejCMDeAovRS5d8jZKiqALFiPp3cjKjEldPkxBY39ZSx3c45awz3RpKwJD1cCgGxEfy8/A==} + engines: {node: '>= 20'} + + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + + token-types@6.1.2: + resolution: {integrity: sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==} + engines: {node: '>=14.16'} + + tsscmp@1.0.6: + resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} + engines: {node: '>=0.6.x'} + + type-is@2.1.0: + resolution: {integrity: sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==} + engines: {node: '>= 18'} + + uint8array-extras@1.6.0: + resolution: {integrity: sha512-8iAasVS4wUx0gPLjH8Xtz2PeDzTSiy8QiLGu2DT3X5GU+egFEQhpnbtkehbAwjvDcxIERmCYcysiODFmE3Ud0Q==} + engines: {node: '>=18'} + + undici@7.30.1: + resolution: {integrity: sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==} + engines: {node: '>=20.18.1'} + + unicorn-magic@0.3.0: + resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==} + engines: {node: '>=18'} + + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + + uri-templates@0.2.0: + resolution: {integrity: sha512-EWkjYEN0L6KOfEoOH6Wj4ghQqU7eBZMJqRHQnxQAq+dSEzRPClkWjf8557HkWQXF6BrAUoLSAyy9i3RVTliaNg==} + + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + wrap-ansi@9.0.2: + resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} + engines: {node: '>=18'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + xsschema@0.4.4: + resolution: {integrity: sha512-TMhbk8AhxO+YuDOn3rXBjGXQ+Vja3T13UPQkHx/FemhusaOzRfCSj2seykt0mdnFPsOtO9l3ANf4adcp+4NRGw==} + peerDependencies: + '@valibot/to-json-schema': ^1.0.0 + arktype: ^2.1.20 + effect: ^3.16.0 + sury: ^10.0.0 + zod: ^3.25.0 || ^4.0.0 + zod-to-json-schema: ^3.25.0 + peerDependenciesMeta: + '@valibot/to-json-schema': + optional: true + arktype: + optional: true + effect: + optional: true + sury: + optional: true + zod: + optional: true + zod-to-json-schema: + optional: true + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@22.0.0: + resolution: {integrity: sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==} + engines: {node: ^20.19.0 || ^22.12.0 || >=23} + + yargs@18.2.0: + resolution: {integrity: sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==} + engines: {node: ^20.19.0 || ^22.12.0 || >=23} + + yoctocolors@2.2.0: + resolution: {integrity: sha512-xYqdZFUK/VYazNl/oCDYN+3WloWQwMfZxBoiNt6qNyk+xfOdi598muWE42rNZFp1kNOiqW936q5RhUdnpqElSg==} + engines: {node: '>=18'} + + zod-to-json-schema@3.25.2: + resolution: {integrity: sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==} + peerDependencies: + zod: ^3.25.28 || ^4 + + zod@4.3.6: + resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} + +snapshots: + + '@apidevtools/json-schema-ref-parser@16.0.5(@types/json-schema@7.0.15)': + dependencies: + '@types/json-schema': 7.0.15 + js-yaml: 5.5.0 + + '@apidevtools/openapi-schemas@2.1.0': {} + + '@apidevtools/swagger-methods@3.0.2': {} + + '@apidevtools/swagger-parser@13.1.0(openapi-types@12.1.3)': + dependencies: + '@apidevtools/json-schema-ref-parser': 16.0.5(@types/json-schema@7.0.15) + '@apidevtools/openapi-schemas': 2.1.0 + '@apidevtools/swagger-methods': 3.0.2 + '@types/json-schema': 7.0.15 + ajv: 8.20.0 + ajv-draft-04: 1.0.0(ajv@8.20.0) + call-me-maybe: 1.0.2 + openapi-types: 12.1.3 + + '@borewit/text-codec@0.2.3': {} + + '@hono/node-server@2.1.5(hono@4.13.14)': + dependencies: + hono: 4.13.14 + + '@modelcontextprotocol/client@2.4.0': + dependencies: + '@modelcontextprotocol/core': 2.4.0 + cross-spawn: 7.0.6 + eventsource: 3.0.7 + eventsource-parser: 3.1.1 + jose: 6.2.14 + pkce-challenge: 5.0.1 + zod: 4.3.6 + + '@modelcontextprotocol/core@2.4.0': + dependencies: + zod: 4.3.6 + + '@modelcontextprotocol/sdk@1.32.2(zod@4.3.6)': + dependencies: + '@hono/node-server': 2.1.5(hono@4.13.14) + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + content-type: 1.0.5 + cors: 2.8.6 + cross-spawn: 7.0.6 + eventsource: 3.0.7 + eventsource-parser: 3.1.1 + express: 5.3.0 + express-rate-limit: 8.7.1(express@5.3.0) + hono: 4.13.14 + jose: 6.2.14 + json-schema-typed: 8.0.2 + pkce-challenge: 5.0.1 + raw-body: 3.0.2 + zod: 4.3.6 + zod-to-json-schema: 3.25.2(zod@4.3.6) + transitivePeerDependencies: + - supports-color + + '@modelcontextprotocol/server@2.4.0': + dependencies: + '@modelcontextprotocol/core': 2.4.0 + zod: 4.3.6 + + '@sec-ant/readable-stream@0.4.1': {} + + '@sindresorhus/merge-streams@4.0.0': {} + + '@standard-schema/spec@1.1.0': {} + + '@tokenizer/inflate@0.4.1': + dependencies: + debug: 4.4.3 + token-types: 6.1.2 + transitivePeerDependencies: + - supports-color + + '@tokenizer/token@0.3.0': {} + + '@types/json-schema@7.0.15': {} + + accepts@1.3.8: + dependencies: + mime-types: 2.1.35 + negotiator: 0.6.3 + + accepts@2.0.0: + dependencies: + mime-types: 3.0.2 + negotiator: 1.1.0 + + agent-base@6.0.2: + dependencies: + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + ajv-draft-04@1.0.0(ajv@8.20.0): + optionalDependencies: + ajv: 8.20.0 + + ajv-formats@3.0.1(ajv@8.20.0): + optionalDependencies: + ajv: 8.20.0 + + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.9 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + + ansi-regex@6.5.0: {} + + ansi-styles@6.2.3: {} + + argparse@3.0.4: {} + + asynckit@0.4.0: {} + + axios@1.21.0(debug@4.4.3): + dependencies: + follow-redirects: 1.16.2(debug@4.4.3) + form-data: 4.0.6 + https-proxy-agent: 5.0.1 + proxy-from-env: 2.1.0 + transitivePeerDependencies: + - debug + - supports-color + + body-parser@2.4.0: + dependencies: + bytes: 3.1.2 + content-type: 2.1.0 + debug: 4.4.3 + http-errors: 2.0.1 + iconv-lite: 0.7.3 + on-finished: 2.4.2 + qs: 6.17.1 + raw-body: 3.0.2 + type-is: 2.1.0 + transitivePeerDependencies: + - supports-color + + bytes@3.1.2: {} + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + + call-me-maybe@1.0.2: {} + + cliui@9.0.1: + dependencies: + string-width: 7.2.0 + strip-ansi: 7.2.0 + wrap-ansi: 9.0.2 + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + + content-disposition@1.0.1: {} + + content-disposition@2.0.1: {} + + content-type@1.0.5: {} + + content-type@2.1.0: {} + + cookie-signature@1.2.2: {} + + cookie@0.7.2: {} + + cookies@0.9.2: + dependencies: + depd: 2.0.0 + keygrip: 1.1.0 + + cors@2.8.6: + dependencies: + object-assign: 4.1.1 + vary: 1.1.2 + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + deep-equal@1.0.1: {} + + delayed-stream@1.0.0: {} + + delegates@1.0.0: {} + + depd@1.1.2: {} + + depd@2.0.0: {} + + destroy@1.2.0: {} + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + ee-first@1.1.1: {} + + emoji-regex@10.6.0: {} + + encodeurl@2.0.1: {} + + end-of-stream@1.4.5: + dependencies: + once: 1.4.0 + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.4 + + escalade@3.2.0: {} + + escape-html@1.0.3: {} + + etag@1.8.1: {} + + eventsource-parser@3.1.1: {} + + eventsource@3.0.7: + dependencies: + eventsource-parser: 3.1.1 + + execa@9.6.1: + dependencies: + '@sindresorhus/merge-streams': 4.0.0 + cross-spawn: 7.0.6 + figures: 6.1.0 + get-stream: 9.0.1 + human-signals: 8.0.1 + is-plain-obj: 4.1.0 + is-stream: 4.0.1 + npm-run-path: 6.0.0 + pretty-ms: 9.3.1 + signal-exit: 4.1.0 + strip-final-newline: 4.0.0 + yoctocolors: 2.2.0 + + express-rate-limit@8.7.1(express@5.3.0): + dependencies: + debug: 4.4.3 + express: 5.3.0 + ip-address: 10.7.5 + transitivePeerDependencies: + - supports-color + + express@5.3.0: + dependencies: + accepts: 2.0.0 + body-parser: 2.4.0 + content-disposition: 2.0.1 + content-type: 2.1.0 + cookie: 0.7.2 + cookie-signature: 1.2.2 + debug: 4.4.3 + depd: 2.0.0 + encodeurl: 2.0.1 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 2.1.1 + fresh: 2.0.0 + http-errors: 2.0.1 + merge-descriptors: 2.0.0 + mime-types: 3.0.2 + on-finished: 2.4.2 + once: 1.4.0 + parseurl: 1.3.3 + proxy-addr: 2.0.8 + qs: 6.17.1 + range-parser: 1.3.0 + router: 2.2.0 + send: 1.2.1 + serve-static: 2.2.1 + statuses: 2.0.2 + type-is: 2.1.0 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + + fast-deep-equal@3.1.3: {} + + fast-uri@3.1.9: {} + + fastmcp@3.35.0: + dependencies: + '@modelcontextprotocol/sdk': 1.32.2(zod@4.3.6) + '@standard-schema/spec': 1.1.0 + execa: 9.6.1 + file-type: 21.3.4 + fuse.js: 7.5.0 + hono: 4.13.14 + mcp-proxy: 6.7.21 + strict-event-emitter-types: 2.0.0 + undici: 7.30.1 + uri-templates: 0.2.0 + xsschema: 0.4.4(zod-to-json-schema@3.25.2(zod@4.3.6))(zod@4.3.6) + yargs: 18.2.0 + zod: 4.3.6 + zod-to-json-schema: 3.25.2(zod@4.3.6) + transitivePeerDependencies: + - '@cfworker/json-schema' + - '@valibot/to-json-schema' + - arktype + - effect + - supports-color + - sury + + fastmcp@4.0.0: + dependencies: + '@modelcontextprotocol/sdk': 1.32.2(zod@4.3.6) + '@standard-schema/spec': 1.1.0 + execa: 9.6.1 + file-type: 21.3.4 + fuse.js: 7.5.0 + hono: 4.13.14 + mcp-proxy: 6.7.21 + strict-event-emitter-types: 2.0.0 + undici: 7.30.1 + uri-templates: 0.2.0 + xsschema: 0.4.4(zod-to-json-schema@3.25.2(zod@4.3.6))(zod@4.3.6) + yargs: 18.2.0 + zod: 4.3.6 + zod-to-json-schema: 3.25.2(zod@4.3.6) + transitivePeerDependencies: + - '@cfworker/json-schema' + - '@valibot/to-json-schema' + - arktype + - effect + - supports-color + - sury + + fastmcp@4.23.7(ajv-formats@3.0.1(ajv@8.20.0))(ajv@8.20.0)(openapi-types@12.1.3): + dependencies: + '@apidevtools/swagger-parser': 13.1.0(openapi-types@12.1.3) + '@modelcontextprotocol/sdk': 1.32.2(zod@4.3.6) + '@standard-schema/spec': 1.1.0 + execa: 9.6.1 + file-type: 21.3.4 + fuse.js: 7.5.0 + hono: 4.13.14 + mcp-proxy: 6.7.21 + strict-event-emitter-types: 2.0.0 + uri-templates: 0.2.0 + xsschema: 0.4.4(zod-to-json-schema@3.25.2(zod@4.3.6))(zod@4.3.6) + yargs: 18.2.0 + zod: 4.3.6 + zod-to-json-schema: 3.25.2(zod@4.3.6) + optionalDependencies: + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + transitivePeerDependencies: + - '@cfworker/json-schema' + - '@valibot/to-json-schema' + - arktype + - effect + - openapi-types + - supports-color + - sury + + figures@6.1.0: + dependencies: + is-unicode-supported: 2.1.0 + + file-type@21.3.4: + dependencies: + '@tokenizer/inflate': 0.4.1 + strtok3: 10.6.3 + token-types: 6.1.2 + uint8array-extras: 1.6.0 + transitivePeerDependencies: + - supports-color + + finalhandler@2.1.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.1 + escape-html: 1.0.3 + on-finished: 2.4.2 + parseurl: 1.3.3 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + + follow-redirects@1.16.2(debug@4.4.3): + optionalDependencies: + debug: 4.4.3 + + form-data@4.0.6: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.4 + mime-types: 2.1.35 + + forwarded@0.2.0: {} + + fresh@0.5.2: {} + + fresh@2.0.0: {} + + function-bind@1.1.2: {} + + fuse.js@7.5.0: {} + + get-caller-file@2.0.5: {} + + get-east-asian-width@1.7.0: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.4 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + + get-stream@9.0.1: + dependencies: + '@sec-ant/readable-stream': 0.4.1 + is-stream: 4.0.1 + + gopd@1.2.0: {} + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + hono@4.13.14: {} + + http-assert@1.5.0: + dependencies: + deep-equal: 1.0.1 + http-errors: 1.8.1 + + http-errors@1.8.1: + dependencies: + depd: 1.1.2 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 1.5.0 + toidentifier: 1.0.1 + + http-errors@2.0.1: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.2 + toidentifier: 1.0.1 + + https-proxy-agent@5.0.1: + dependencies: + agent-base: 6.0.2 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + human-readable-ids@1.0.4: + dependencies: + knuth-shuffle: 1.0.8 + + human-signals@8.0.1: {} + + iconv-lite@0.7.3: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: {} + + inherits@2.0.4: {} + + ip-address@10.7.5: {} + + ipaddr.js@1.9.1: {} + + is-plain-obj@4.1.0: {} + + is-promise@4.0.0: {} + + is-stream@4.0.1: {} + + is-unicode-supported@2.1.0: {} + + isexe@2.0.0: {} + + jose@6.2.14: {} + + js-yaml@5.5.0: + dependencies: + argparse: 3.0.4 + + json-schema-traverse@1.0.0: {} + + json-schema-typed@8.0.2: {} + + keygrip@1.1.0: + dependencies: + tsscmp: 1.0.6 + + knuth-shuffle@1.0.8: {} + + koa-compose@4.1.0: {} + + koa-router@14.0.0: + dependencies: + debug: 4.4.3 + http-errors: 2.0.1 + koa-compose: 4.1.0 + path-to-regexp: 8.4.2 + transitivePeerDependencies: + - supports-color + + koa@3.2.1: + dependencies: + accepts: 1.3.8 + content-disposition: 1.0.1 + content-type: 1.0.5 + cookies: 0.9.2 + delegates: 1.0.0 + destroy: 1.2.0 + encodeurl: 2.0.1 + escape-html: 1.0.3 + fresh: 0.5.2 + http-assert: 1.5.0 + http-errors: 2.0.1 + koa-compose: 4.1.0 + mime-types: 3.0.2 + on-finished: 2.4.2 + parseurl: 1.3.3 + statuses: 2.0.2 + type-is: 2.1.0 + vary: 1.1.2 + + math-intrinsics@1.1.0: {} + + mcp-proxy@6.7.21: + dependencies: + '@modelcontextprotocol/client': 2.4.0 + '@modelcontextprotocol/server': 2.4.0 + pipenet: 1.4.3 + transitivePeerDependencies: + - supports-color + + media-typer@1.1.1: {} + + merge-descriptors@2.0.0: {} + + mime-db@1.52.0: {} + + mime-db@1.54.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mime-types@3.0.2: + dependencies: + mime-db: 1.54.0 + + ms@2.1.3: {} + + negotiator@0.6.3: {} + + negotiator@1.1.0: + dependencies: + content-type: 2.1.0 + + npm-run-path@6.0.0: + dependencies: + path-key: 4.0.0 + unicorn-magic: 0.3.0 + + object-assign@4.1.1: {} + + object-inspect@1.13.4: {} + + on-finished@2.4.2: + dependencies: + ee-first: 1.1.1 + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + openapi-types@12.1.3: {} + + parse-ms@4.0.0: {} + + parseurl@1.3.3: {} + + path-key@3.1.1: {} + + path-key@4.0.0: {} + + path-to-regexp@8.4.2: {} + + pipenet@1.4.3: + dependencies: + axios: 1.21.0(debug@4.4.3) + debug: 4.4.3 + human-readable-ids: 1.0.4 + koa: 3.2.1 + koa-router: 14.0.0 + pump: 3.0.4 + tldjs: 2.3.2 + yargs: 18.2.0 + transitivePeerDependencies: + - supports-color + + pkce-challenge@5.0.1: {} + + pretty-ms@9.3.1: + dependencies: + parse-ms: 4.0.0 + + proxy-addr@2.0.8: + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + + proxy-from-env@2.1.0: {} + + pump@3.0.4: + dependencies: + end-of-stream: 1.4.5 + once: 1.4.0 + + punycode@2.3.1: {} + + qs@6.17.1: + dependencies: + es-define-property: 1.0.1 + side-channel: 1.1.1 + + range-parser@1.3.0: {} + + raw-body@3.0.2: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.1 + iconv-lite: 0.7.3 + unpipe: 1.0.0 + + require-from-string@2.0.2: {} + + router@2.2.0: + dependencies: + debug: 4.4.3 + depd: 2.0.0 + is-promise: 4.0.0 + parseurl: 1.3.3 + path-to-regexp: 8.4.2 + transitivePeerDependencies: + - supports-color + + safer-buffer@2.1.2: {} + + send@1.2.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.1 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 2.0.0 + http-errors: 2.0.1 + mime-types: 3.0.2 + ms: 2.1.3 + on-finished: 2.4.2 + range-parser: 1.3.0 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + + serve-static@2.2.1: + dependencies: + encodeurl: 2.0.1 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 1.2.1 + transitivePeerDependencies: + - supports-color + + setprototypeof@1.2.0: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + + signal-exit@4.1.0: {} + + statuses@1.5.0: {} + + statuses@2.0.2: {} + + strict-event-emitter-types@2.0.0: {} + + string-width@7.2.0: + dependencies: + emoji-regex: 10.6.0 + get-east-asian-width: 1.7.0 + strip-ansi: 7.2.0 + + string-width@8.3.0: + dependencies: + get-east-asian-width: 1.7.0 + strip-ansi: 7.2.0 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.5.0 + + strip-final-newline@4.0.0: {} + + strtok3@10.6.3: + dependencies: + '@tokenizer/token': 0.3.0 + + tldjs@2.3.2: + dependencies: + punycode: 2.3.1 + + toidentifier@1.0.1: {} + + token-types@6.1.2: + dependencies: + '@borewit/text-codec': 0.2.3 + '@tokenizer/token': 0.3.0 + ieee754: 1.2.1 + + tsscmp@1.0.6: {} + + type-is@2.1.0: + dependencies: + content-type: 2.1.0 + media-typer: 1.1.1 + mime-types: 3.0.2 + + uint8array-extras@1.6.0: {} + + undici@7.30.1: {} + + unicorn-magic@0.3.0: {} + + unpipe@1.0.0: {} + + uri-templates@0.2.0: {} + + vary@1.1.2: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + wrap-ansi@9.0.2: + dependencies: + ansi-styles: 6.2.3 + string-width: 7.2.0 + strip-ansi: 7.2.0 + + wrappy@1.0.2: {} + + xsschema@0.4.4(zod-to-json-schema@3.25.2(zod@4.3.6))(zod@4.3.6): + optionalDependencies: + zod: 4.3.6 + zod-to-json-schema: 3.25.2(zod@4.3.6) + + y18n@5.0.8: {} + + yargs-parser@22.0.0: {} + + yargs@18.2.0: + dependencies: + cliui: 9.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + string-width: 8.3.0 + y18n: 5.0.8 + yargs-parser: 22.0.0 + + yoctocolors@2.2.0: {} + + zod-to-json-schema@3.25.2(zod@4.3.6): + dependencies: + zod: 4.3.6 + + zod@4.3.6: {} diff --git a/e2e/scenarios/fastmcp-instrumentation/scenario.mjs b/e2e/scenarios/fastmcp-instrumentation/scenario.mjs new file mode 100644 index 000000000..839e73a83 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/scenario.mjs @@ -0,0 +1,135 @@ +import "./configure.mjs"; +import { createRequire } from "node:module"; +import { createServer } from "node:net"; +import assert from "node:assert/strict"; +import { injectTraceContext, traced, wrapFastMCP } from "braintrust"; +import { Client } from "@modelcontextprotocol/sdk/client/index.js"; +import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"; +import { z } from "zod"; +import { MINIMAL_PNG_BASE64 } from "../../helpers/media-fixtures.mjs"; +import { + runOperation, + runTracedScenario, +} from "../../helpers/provider-runtime.mjs"; + +const dependency = process.env.FASTMCP_PACKAGE; +const fastmcp = + process.env.FASTMCP_CJS === "1" + ? createRequire(import.meta.url)(dependency) + : await import(dependency); +if (process.env.FASTMCP_WRAPPED === "1") { + assert.equal(wrapFastMCP(fastmcp), fastmcp); + wrapFastMCP(fastmcp); +} + +await runTracedScenario({ + rootName: "fastmcp-instrumentation-root", + projectNameBase: "tmp-luca", + metadata: { scenario: "fastmcp-instrumentation" }, + async callback() { + for (const stateless of [false, true]) { + const listener = createServer(); + await new Promise((resolve) => listener.listen(0, "127.0.0.1", resolve)); + const { port } = listener.address(); + await new Promise((resolve, reject) => + listener.close((error) => (error ? reject(error) : resolve())), + ); + const server = new fastmcp.FastMCP({ + name: "braintrust-e2e-fastmcp", + version: "1.0.0", + ping: { enabled: false }, + }); + server.addTool({ + name: "get_weather", + parameters: z.object({ city: z.string() }), + execute: async ({ city }) => + traced(async () => `Sunny in ${city}`, { name: "weather-lookup" }), + }); + server.addTool({ + name: "get_alerts", + execute: async () => { + throw new fastmcp.UserError("Alert service unavailable"); + }, + }); + server.addTool({ + name: "render_map", + execute: async () => ({ + content: [ + { type: "image", data: MINIMAL_PNG_BASE64, mimeType: "image/png" }, + ], + }), + }); + server.addResource({ + uri: "notes://forecast", + name: "forecast-notes", + mimeType: "text/plain", + load: async () => ({ text: "Bring an umbrella." }), + }); + server.addPrompt({ + name: "forecast", + arguments: [{ name: "city", required: true }], + load: async ({ city }) => `What is the forecast for ${city}?`, + }); + await server.start({ + transportType: "httpStream", + httpStream: { host: "127.0.0.1", port, stateless }, + }); + const transport = new StreamableHTTPClientTransport( + new URL(`http://127.0.0.1:${port}/mcp`), + ); + const send = transport.send; + transport.send = function (message, ...args) { + if (typeof message.method === "string") { + message = { + ...message, + params: { + ...message.params, + _meta: { ...message.params?._meta, ...injectTraceContext() }, + }, + }; + } + return send.call(this, message, ...args); + }; + const client = new Client({ + name: "braintrust-e2e-client", + version: "1.0.0", + }); + try { + await runOperation( + `fastmcp-${stateless ? "stateless" : "session"}`, + "mcp", + async () => { + await client.connect(transport); + assert.ok( + (await client.listTools()).tools.some( + (tool) => tool.name === "get_weather", + ), + ); + const weather = await client.callTool({ + name: "get_weather", + arguments: { city: "Vienna" }, + }); + assert.deepEqual(weather.content, [ + { type: "text", text: "Sunny in Vienna" }, + ]); + assert.equal( + (await client.callTool({ name: "get_alerts" })).isError, + true, + ); + await client.callTool({ name: "render_map" }); + await client.readResource({ uri: "notes://forecast" }); + await client.getPrompt({ + name: "forecast", + arguments: { city: "Vienna" }, + }); + await client.ping(); + await client.close(); + }, + ); + } finally { + await client.close(); + await server.stop(); + } + } + }, +}); diff --git a/e2e/scenarios/fastmcp-instrumentation/scenario.test.ts b/e2e/scenarios/fastmcp-instrumentation/scenario.test.ts new file mode 100644 index 000000000..3595cbe24 --- /dev/null +++ b/e2e/scenarios/fastmcp-instrumentation/scenario.test.ts @@ -0,0 +1,188 @@ +import { describe, test } from "vitest"; +import { describeVariant } from "../../helpers/describe-variant"; +import { resolveFileSnapshotPath } from "../../helpers/file-snapshot"; +import { + prepareScenarioDir, + readInstalledPackageVersion, + resolveScenarioDir, + withScenarioHarness, +} from "../../helpers/scenario-harness"; +import { matchSpanTreeSnapshot, spanTreeFields } from "../../helpers/span-tree"; +import { + findChildSpans, + findLatestSpan, + spanInstrumentationName, +} from "../../helpers/trace-selectors"; + +const originalScenarioDir = resolveScenarioDir(import.meta.url); +const scenarioDir = await prepareScenarioDir({ + scenarioDir: originalScenarioDir, +}); +const variants = await Promise.all( + ["fastmcp-v3", "fastmcp-v3-latest", "fastmcp-v4", "fastmcp-v4-latest"].map( + async (dependency) => ({ + dependency, + version: await readInstalledPackageVersion(scenarioDir, dependency), + }), + ), +); + +describe.concurrent("variants", () => { + for (const { dependency, version } of variants) { + describeVariant(`${dependency} ${version}`, () => { + for (const mode of ["wrapped", "auto", "both"]) { + for (const captureContent of [true, false]) { + test(`${mode}, captureContent=${captureContent}`, async ({ + expect, + }) => { + await withScenarioHarness(async (harness) => { + await harness.runNodeScenarioDir({ + scenarioDir, + entry: "scenario.mjs", + nodeArgs: [ + "--import", + `${scenarioDir}/configure.mjs`, + ...(mode === "wrapped" + ? [] + : ["--import", "braintrust/hook.mjs"]), + ], + env: { + FASTMCP_MCP_ENABLED: mode === "both" ? "1" : "0", + FASTMCP_PACKAGE: dependency, + FASTMCP_CJS: dependency.endsWith("latest") ? "0" : "1", + FASTMCP_WRAPPED: mode === "auto" ? "0" : "1", + MCP_CAPTURE_CONTENT: captureContent ? "1" : "0", + BRAINTRUST_CAPTURE_ATTACHMENTS: "0", + }, + runContext: { + cassette: false, + originalScenarioDir, + variantKey: dependency, + }, + }); + const events = harness.events(); + expect( + findLatestSpan(events, "fastmcp-instrumentation-root"), + ).toBeDefined(); + for (const kind of ["session", "stateless"]) { + const operation = findLatestSpan(events, `fastmcp-${kind}`)!; + const requests = findChildSpans( + events, + "tools/call get_weather", + operation.span.id, + ); + expect(requests).toHaveLength(1); + const [weather] = requests; + expect(weather.span.type).toBe("tool"); + expect(spanInstrumentationName(weather)).toBe("fastmcp"); + expect(weather.row.metadata).toMatchObject({ + "mcp.method.name": "tools/call", + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "get_weather", + "network.protocol.name": "http", + }); + expect(weather.row.metadata?.["mcp.session.id"]).toEqual( + kind === "session" ? expect.any(String) : undefined, + ); + expect( + findChildSpans(events, "weather-lookup", weather.span.id), + ).toHaveLength(1); + const [alerts] = findChildSpans( + events, + "tools/call get_alerts", + operation.span.id, + ); + expect(alerts.row.metadata?.["error.type"]).toBe("tool_error"); + expect(alerts.row.error).toContain( + captureContent + ? "Alert service unavailable" + : "Tool returned an error result", + ); + if (captureContent) { + expect(weather.input).toEqual({ city: "Vienna" }); + expect(weather.output).toMatchObject({ + content: [{ type: "text", text: "Sunny in Vienna" }], + }); + const [map] = findChildSpans( + events, + "tools/call render_map", + operation.span.id, + ); + expect(map.output).toMatchObject({ + content: [{ type: "image", data: "" }], + }); + expect( + findChildSpans( + events, + "resources/read", + operation.span.id, + )[0].output, + ).toMatchObject({ + contents: [ + { uri: "notes://forecast", text: "Bring an umbrella." }, + ], + }); + expect( + findChildSpans( + events, + "prompts/get forecast", + operation.span.id, + )[0].output, + ).toMatchObject({ + messages: [ + { + role: "user", + content: { + type: "text", + text: "What is the forecast for Vienna?", + }, + }, + ], + }); + } + } + for (const event of events.filter( + (event) => spanInstrumentationName(event) === "fastmcp", + )) { + expect(event.span.ended).toBe(true); + if (!captureContent) { + expect(event.input).toBeUndefined(); + expect(event.output).toBeUndefined(); + } + } + await matchSpanTreeSnapshot( + events.map((event) => ({ + event, + fields: { + ...spanTreeFields(event), + metadata: event.row.metadata && { + ...event.row.metadata, + ...(event.row.metadata["client.port"] !== undefined + ? { "client.port": "" } + : {}), + }, + context: event.row.context && { + ...event.row.context, + ...(event.row.context.caller_filename !== undefined + ? { caller_filename: "" } + : {}), + ...(event.row.context.caller_functionname !== undefined + ? { caller_functionname: "" } + : {}), + }, + metrics: event.metrics, + }, + })), + resolveFileSnapshotPath( + import.meta.url, + `${dependency}${captureContent ? "" : "-no-content"}.span-tree.json`, + ), + { snapshotExpect: expect }, + ); + }); + }); + } + } + }); + } +}); diff --git a/js/src/auto-instrumentations/configs/all.ts b/js/src/auto-instrumentations/configs/all.ts index 751e0b8ac..33be8a3ac 100644 --- a/js/src/auto-instrumentations/configs/all.ts +++ b/js/src/auto-instrumentations/configs/all.ts @@ -38,6 +38,7 @@ import { strandsAgentSDKConfigs } from "./strands-agent-sdk"; import { elevenLabsConfigs } from "./elevenlabs"; import { voyageAIConfigs } from "./voyageai"; import { mcpConfigs } from "./mcp"; +import { fastMCPConfigs } from "./fastmcp"; import { typeSafeConfigs } from "./typesafe"; interface InstrumentationConfigGroup { @@ -146,6 +147,10 @@ const defaultInstrumentationConfigGroups: readonly InstrumentationConfigGroup[] integrations: ["mcp"], configs: mcpConfigs, }, + { + integrations: ["fastmcp"], + configs: fastMCPConfigs, + }, { integrations: ["typesafe"], configs: typeSafeConfigs, diff --git a/js/src/auto-instrumentations/configs/fastmcp.ts b/js/src/auto-instrumentations/configs/fastmcp.ts new file mode 100644 index 000000000..6851ae4a6 --- /dev/null +++ b/js/src/auto-instrumentations/configs/fastmcp.ts @@ -0,0 +1,15 @@ +import type { InstrumentationConfig } from "../orchestrion-js"; +import { fastMCPChannels } from "../../instrumentation/plugins/fastmcp-interceptors"; + +export const fastMCPConfigs: InstrumentationConfig[] = [ + // FastMCP publishes its session class in content-hashed ESM/CJS chunks. + ...["dist/chunk-*.js", "dist/chunk-*.cjs"].map((filePath) => ({ + channelName: fastMCPChannels.sessionConnect.channelName, + module: { + name: "fastmcp", + versionRange: ">=3.35.0 <5.0.0", + filePath, + }, + functionQuery: { className: "FastMCPSession", methodName: "connect" }, + })), +]; diff --git a/js/src/exports.ts b/js/src/exports.ts index 9cf8b897b..9b5736b05 100644 --- a/js/src/exports.ts +++ b/js/src/exports.ts @@ -244,6 +244,7 @@ export { wrapOllama } from "./wrappers/ollama"; export { wrapCohere } from "./wrappers/cohere"; export { wrapVoyageAI } from "./wrappers/voyageai"; export { wrapMCPServer } from "./wrappers/mcp"; +export { wrapFastMCP } from "./wrappers/fastmcp"; export { wrapWorkersAI } from "./wrappers/workers-ai"; export { wrapTypeSafe } from "./wrappers/typesafe"; export { wrapGroq } from "./wrappers/groq"; diff --git a/js/src/instrumentation/braintrust-plugin.ts b/js/src/instrumentation/braintrust-plugin.ts index 5de60a49a..4464128f3 100644 --- a/js/src/instrumentation/braintrust-plugin.ts +++ b/js/src/instrumentation/braintrust-plugin.ts @@ -30,6 +30,7 @@ import { StrandsAgentSDKPlugin } from "./plugins/strands-agent-sdk-plugin"; import { ElevenLabsPlugin } from "./plugins/elevenlabs-plugin"; import { LiveKitPlugin } from "./plugins/livekit-plugin"; import { MCPPlugin } from "./plugins/mcp-plugin"; +import { FastMCPPlugin } from "./plugins/fastmcp-plugin"; import { VoyageAIPlugin } from "./plugins/voyageai-plugin"; import { WorkersAIPlugin } from "./plugins/workers-ai-plugin"; import { TypeSafePlugin } from "./plugins/typesafe-plugin"; @@ -97,6 +98,7 @@ export class BraintrustPlugin extends BasePlugin { private liveKitPlugin: LiveKitPlugin | null = null; private voyageAIPlugin: VoyageAIPlugin | null = null; private mcpPlugin: MCPPlugin | null = null; + private fastMCPPlugin: FastMCPPlugin | null = null; private workersAIPlugin: WorkersAIPlugin | null = null; private typeSafePlugin: TypeSafePlugin | null = null; private cloudflareAIChatPlugin: CloudflareAIChatPlugin | null = null; @@ -238,6 +240,13 @@ export class BraintrustPlugin extends BasePlugin { this.mcpPlugin.enable(); } + if (integrations.fastmcp !== false) { + this.fastMCPPlugin = new FastMCPPlugin( + typeof integrations.fastmcp === "object" ? integrations.fastmcp : {}, + ); + this.fastMCPPlugin.enable(); + } + if (integrations.workersAI !== false) { this.workersAIPlugin = new WorkersAIPlugin(); this.workersAIPlugin.enable(); @@ -431,6 +440,11 @@ export class BraintrustPlugin extends BasePlugin { this.mcpPlugin = null; } + if (this.fastMCPPlugin) { + this.fastMCPPlugin.disable(); + this.fastMCPPlugin = null; + } + if (this.workersAIPlugin) { this.workersAIPlugin.disable(); this.workersAIPlugin = null; diff --git a/js/src/instrumentation/config.ts b/js/src/instrumentation/config.ts index 5f336cf3b..bed6f1c58 100644 --- a/js/src/instrumentation/config.ts +++ b/js/src/instrumentation/config.ts @@ -67,6 +67,8 @@ export interface InstrumentationIntegrationsConfig { livekit?: boolean | LiveKitIntegrationConfig; /** Set to false to disable, or pass options; options keep MCP enabled. */ mcp?: boolean | MCPIntegrationConfig; + /** Set to false to disable, or pass options; options keep FastMCP enabled. */ + fastmcp?: boolean | MCPIntegrationConfig; } export interface MCPIntegrationConfig { @@ -239,6 +241,7 @@ const envIntegrationAliases: Record< livekit: "livekit", "@livekit/agents": "livekit", mcp: "mcp", + fastmcp: "fastmcp", modelcontextprotocol: "mcp", "@modelcontextprotocol/sdk": "mcp", "@modelcontextprotocol/server": "mcp", @@ -288,6 +291,7 @@ export function getDefaultInstrumentationIntegrations(): Record< elevenlabs: true, livekit: true, mcp: true, + fastmcp: true, piCodingAgent: true, strandsAgentSDK: true, cloudflareAgents: true, diff --git a/js/src/instrumentation/plugins/fastmcp-interceptors.ts b/js/src/instrumentation/plugins/fastmcp-interceptors.ts new file mode 100644 index 000000000..a9f21432f --- /dev/null +++ b/js/src/instrumentation/plugins/fastmcp-interceptors.ts @@ -0,0 +1,11 @@ +import type { FastMCPSession } from "../../vendor-sdk-types/fastmcp"; +import { mcpChannelDefinitions } from "./mcp-interceptors"; +import { channel, defineInterceptor } from "../core/interceptor-definitions"; + +export const fastMCPChannels = defineInterceptor("fastmcp", { + ...mcpChannelDefinitions, + sessionConnect: channel< + Parameters, + ReturnType + >({ channelName: "FastMCPSession.connect" }), +}); diff --git a/js/src/instrumentation/plugins/fastmcp-plugin.ts b/js/src/instrumentation/plugins/fastmcp-plugin.ts new file mode 100644 index 000000000..81a6f5253 --- /dev/null +++ b/js/src/instrumentation/plugins/fastmcp-plugin.ts @@ -0,0 +1,35 @@ +import type { FastMCPSession } from "../../vendor-sdk-types/fastmcp"; +import type { MCPProtocol } from "../../vendor-sdk-types/mcp"; +import { INSTRUMENTATION_NAMES } from "../../span-origin"; +import type { MCPIntegrationConfig } from "../config"; +import { runInstrumentation } from "../core/observe-result"; +import { fastMCPChannels } from "./fastmcp-interceptors"; +import { wrapMCPProtocol, wrapMCPTransport } from "./mcp-interceptors"; +import { MCPTracingPlugin } from "./mcp-tracing-plugin"; + +export class FastMCPPlugin extends MCPTracingPlugin { + constructor(config: MCPIntegrationConfig = {}) { + super(fastMCPChannels, config, INSTRUMENTATION_NAMES.FASTMCP); + } + + protected onEnable(): void { + super.onEnable(); + this.unsubscribers.push( + fastMCPChannels.sessionConnect.intercept((target, receiver, args) => { + runInstrumentation(() => { + const protocol = (receiver as FastMCPSession).server; + wrapMCPProtocol(protocol, fastMCPChannels); + wrapMCPTransport(args[0], protocol, fastMCPChannels); + }); + return Reflect.apply(target, receiver, args); + }), + fastMCPChannels.connect.intercept((target, receiver, args) => { + runInstrumentation(() => { + const protocol = receiver as MCPProtocol; + wrapMCPTransport(args[0], protocol, fastMCPChannels); + }); + return Reflect.apply(target, receiver, args); + }), + ); + } +} diff --git a/js/src/instrumentation/plugins/mcp-interceptors.ts b/js/src/instrumentation/plugins/mcp-interceptors.ts index 13445cb17..5c0626b64 100644 --- a/js/src/instrumentation/plugins/mcp-interceptors.ts +++ b/js/src/instrumentation/plugins/mcp-interceptors.ts @@ -24,7 +24,7 @@ export const mcpServerChannels = defineInterceptor( "@modelcontextprotocol/server", protocolChannels, ); -export const mcpChannels = defineInterceptor("mcp", { +export const mcpChannelDefinitions = { connect: channel<[MCPTransport, ...unknown[]], unknown>({ channelName: "connect", }), @@ -57,7 +57,10 @@ export const mcpChannels = defineInterceptor("mcp", { unknown, { protocol: MCPProtocol } >({ channelName: "notificationHandler" }), -}); +}; + +export const mcpChannels = defineInterceptor("mcp", mcpChannelDefinitions); +export type MCPChannels = typeof mcpChannels; const wrapped = Symbol.for("braintrust.mcp.transport-wrapper"); function wrapMethod( @@ -78,13 +81,14 @@ function wrapMethod( export function wrapMCPTransport( transport: MCPTransport, protocol: MCPProtocol, + channels: MCPChannels = mcpChannels, ): void { wrapMethod( transport, "handleRequest", (original) => function (this: unknown, ...args) { - return mcpChannels.httpRequest.invoke( + return channels.httpRequest.invoke( original, this, args as [unknown, ...unknown[]], @@ -103,15 +107,17 @@ export function wrapMCPTransport( protocol.fallbackRequestHandler = wrapMCPRequestHandler( protocol.fallbackRequestHandler, protocol, + channels, ); } if (protocol.fallbackNotificationHandler) { protocol.fallbackNotificationHandler = wrapMCPNotificationHandler( protocol.fallbackNotificationHandler, protocol, + channels, ); } - return mcpChannels.message.invoke( + return channels.message.invoke( original, this, args as [unknown, ...unknown[]], @@ -124,7 +130,7 @@ export function wrapMCPTransport( "onclose", (original) => function (this: unknown, ...args) { - return mcpChannels.close.invoke(original, this, args, { transport }); + return channels.close.invoke(original, this, args, { transport }); }, ); }; @@ -144,7 +150,7 @@ export function wrapMCPTransport( "send", (original) => function (this: unknown, ...args) { - return mcpChannels.send.invoke( + return channels.send.invoke( original, this, args as [unknown, ...unknown[]], @@ -158,6 +164,7 @@ export function wrapMCPTransport( export function wrapMCPRequestHandler( handler: MCPRequestHandler, protocol: MCPProtocol, + channels: MCPChannels = mcpChannels, ): MCPRequestHandler { if (Reflect.get(handler, wrapped) === protocol) return handler; const replacement: MCPRequestHandler = function ( @@ -165,7 +172,7 @@ export function wrapMCPRequestHandler( request, extra, ) { - return mcpChannels.requestHandler.invoke(handler, this, [request, extra], { + return channels.requestHandler.invoke(handler, this, [request, extra], { protocol, }); }; @@ -173,13 +180,16 @@ export function wrapMCPRequestHandler( return replacement; } -export function wrapMCPProtocol(protocol: MCPProtocol): void { +export function wrapMCPProtocol( + protocol: MCPProtocol, + channels: MCPChannels = mcpChannels, +): void { wrapMethod( protocol, "connect", (original) => function (this: unknown, ...args) { - return mcpChannels.connect.invoke( + return channels.connect.invoke( original, this, args as [MCPTransport, ...unknown[]], @@ -197,6 +207,7 @@ export function wrapMCPProtocol(protocol: MCPProtocol): void { args[index] = wrapMCPRequestHandler( args[index] as MCPRequestHandler, protocol, + channels, ); return Reflect.apply(original, this, args); }, @@ -211,7 +222,7 @@ export function wrapMCPProtocol(protocol: MCPProtocol): void { for (const [method, handler] of protocol._notificationHandlers ?? []) { protocol._notificationHandlers!.set( method, - wrapMCPNotificationHandler(handler, protocol), + wrapMCPNotificationHandler(handler, protocol, channels), ); } return result; @@ -222,34 +233,36 @@ export function wrapMCPProtocol(protocol: MCPProtocol): void { "_onerror", (original) => function (this: unknown, error) { - return mcpChannels.protocolError.invoke(original, this, [error], {}); + return channels.protocolError.invoke(original, this, [error], {}); }, ); for (const [method, handler] of protocol._requestHandlers ?? []) { protocol._requestHandlers!.set( method, - wrapMCPRequestHandler(handler, protocol), + wrapMCPRequestHandler(handler, protocol, channels), ); } for (const [method, handler] of protocol._notificationHandlers ?? []) { protocol._notificationHandlers!.set( method, - wrapMCPNotificationHandler(handler, protocol), + wrapMCPNotificationHandler(handler, protocol, channels), ); } - if (protocol.transport) wrapMCPTransport(protocol.transport, protocol); + if (protocol.transport) + wrapMCPTransport(protocol.transport, protocol, channels); } function wrapMCPNotificationHandler( handler: MCPNotificationHandler, protocol: MCPProtocol, + channels: MCPChannels = mcpChannels, ): MCPNotificationHandler { if (Reflect.get(handler, wrapped) === protocol) return handler; const replacement: MCPNotificationHandler = function ( this: unknown, ...args ) { - return mcpChannels.notificationHandler.invoke(handler, this, args, { + return channels.notificationHandler.invoke(handler, this, args, { protocol, }); }; diff --git a/js/src/instrumentation/plugins/mcp-plugin.ts b/js/src/instrumentation/plugins/mcp-plugin.ts index 51db6f273..5553ea6b0 100644 --- a/js/src/instrumentation/plugins/mcp-plugin.ts +++ b/js/src/instrumentation/plugins/mcp-plugin.ts @@ -2,9 +2,9 @@ import type { MCPProtocol, MCPRequestHandler, } from "../../vendor-sdk-types/mcp"; -import { BasePlugin } from "../core"; +import { MCPTracingPlugin } from "./mcp-tracing-plugin"; +import { INSTRUMENTATION_NAMES } from "../../span-origin"; import type { MCPIntegrationConfig } from "../config"; -import { unsubscribeAll } from "../core/tracing"; import { runInstrumentation } from "../core/observe-result"; import { mcpChannels, @@ -14,22 +14,14 @@ import { wrapMCPTransport, wrapMCPRequestHandler, } from "./mcp-interceptors"; -import { - traceMCPMessage, - traceMCPSend, - traceMCPClose, - traceMCPHandler, - traceMCPProtocolError, - traceMCPNotificationHandler, - traceMCPHttpRequest, -} from "./mcp-tracing"; -export class MCPPlugin extends BasePlugin { - constructor(private readonly config: MCPIntegrationConfig = {}) { - super(); +export class MCPPlugin extends MCPTracingPlugin { + constructor(config: MCPIntegrationConfig = {}) { + super(mcpChannels, config, INSTRUMENTATION_NAMES.MCP); } protected onEnable(): void { + super.onEnable(); this.unsubscribers.push( ...[ mcpChannels.connect, @@ -68,60 +60,6 @@ export class MCPPlugin extends BasePlugin { return Reflect.apply(target, receiver, wrappedArgs); }), ), - mcpChannels.message.intercept((target, receiver, args, { transport }) => - traceMCPMessage( - () => Reflect.apply(target, receiver, args), - transport, - args[0], - this.config, - ), - ), - mcpChannels.send.intercept((target, receiver, args, { transport }) => - traceMCPSend( - () => Reflect.apply(target, receiver, args), - transport, - args[0], - args[1], - this.config, - ), - ), - mcpChannels.close.intercept((target, receiver, args, { transport }) => - traceMCPClose(() => Reflect.apply(target, receiver, args), transport), - ), - mcpChannels.requestHandler.intercept( - (target, receiver, args, { protocol }) => - traceMCPHandler( - () => Reflect.apply(target, receiver, args), - protocol, - args[0], - args[1], - ), - ), - mcpChannels.protocolError.intercept((target, receiver, args) => - traceMCPProtocolError( - () => Reflect.apply(target, receiver, args), - args[0], - ), - ), - mcpChannels.notificationHandler.intercept( - (target, receiver, args, { protocol }) => - traceMCPNotificationHandler( - () => Reflect.apply(target, receiver, args), - protocol, - ), - ), - mcpChannels.httpRequest.intercept( - (target, receiver, args, { transport }) => - traceMCPHttpRequest( - () => Reflect.apply(target, receiver, args), - transport, - args[0], - ), - ), ); } - - protected onDisable(): void { - this.unsubscribers = unsubscribeAll(this.unsubscribers); - } } diff --git a/js/src/instrumentation/plugins/mcp-tracing-plugin.ts b/js/src/instrumentation/plugins/mcp-tracing-plugin.ts new file mode 100644 index 000000000..eabc616cb --- /dev/null +++ b/js/src/instrumentation/plugins/mcp-tracing-plugin.ts @@ -0,0 +1,86 @@ +import { BasePlugin } from "../core"; +import type { MCPIntegrationConfig } from "../config"; +import type { SpanInstrumentationName } from "../../span-origin"; +import type { MCPChannels } from "./mcp-interceptors"; +import { unsubscribeAll } from "../core/tracing"; +import { + traceMCPMessage, + traceMCPSend, + traceMCPClose, + traceMCPHandler, + traceMCPProtocolError, + traceMCPNotificationHandler, + traceMCPHttpRequest, +} from "./mcp-tracing"; + +/** Shared protocol tracing; each provider registers its own invocation hooks. */ +export class MCPTracingPlugin extends BasePlugin { + constructor( + private readonly channels: MCPChannels, + private readonly config: MCPIntegrationConfig, + private readonly instrumentationName: SpanInstrumentationName, + ) { + super(); + } + + protected onEnable(): void { + const channels = this.channels; + this.unsubscribers.push( + channels.message.intercept((target, receiver, args, { transport }) => + traceMCPMessage( + () => Reflect.apply(target, receiver, args), + transport, + args[0], + this.config, + this.instrumentationName, + ), + ), + channels.send.intercept((target, receiver, args, { transport }) => + traceMCPSend( + () => Reflect.apply(target, receiver, args), + transport, + args[0], + args[1], + this.config, + this.instrumentationName, + ), + ), + channels.close.intercept((target, receiver, args, { transport }) => + traceMCPClose(() => Reflect.apply(target, receiver, args), transport), + ), + channels.requestHandler.intercept( + (target, receiver, args, { protocol }) => + traceMCPHandler( + () => Reflect.apply(target, receiver, args), + protocol, + args[0], + args[1], + ), + ), + channels.protocolError.intercept((target, receiver, args) => + traceMCPProtocolError( + () => Reflect.apply(target, receiver, args), + args[0], + ), + ), + channels.notificationHandler.intercept( + (target, receiver, args, { protocol }) => + traceMCPNotificationHandler( + () => Reflect.apply(target, receiver, args), + protocol, + ), + ), + channels.httpRequest.intercept((target, receiver, args, { transport }) => + traceMCPHttpRequest( + () => Reflect.apply(target, receiver, args), + transport, + args[0], + ), + ), + ); + } + + protected onDisable(): void { + this.unsubscribers = unsubscribeAll(this.unsubscribers); + } +} diff --git a/js/src/instrumentation/plugins/mcp-tracing.ts b/js/src/instrumentation/plugins/mcp-tracing.ts index ff9527976..0c1fed5b6 100644 --- a/js/src/instrumentation/plugins/mcp-tracing.ts +++ b/js/src/instrumentation/plugins/mcp-tracing.ts @@ -11,6 +11,7 @@ import { } from "../../logger"; import { INSTRUMENTATION_NAMES, + type SpanInstrumentationName, withSpanInstrumentationName, } from "../../span-origin"; import type { @@ -292,6 +293,7 @@ export function traceMCPMessage( transport: MCPTransport, message: unknown, config: MCPIntegrationConfig = {}, + instrumentationName: SpanInstrumentationName = INSTRUMENTATION_NAMES.MCP, ): T { const request = runInstrumentation(() => { if ( @@ -435,7 +437,7 @@ export function traceMCPMessage( : {}), }, }, - INSTRUMENTATION_NAMES.MCP, + instrumentationName, ); const span = withCurrent(NOOP_SPAN, () => startSpan(spanArgs)); const state: PendingRequest = { @@ -493,6 +495,7 @@ export function traceMCPSend( message: unknown, options?: unknown, config: MCPIntegrationConfig = {}, + instrumentationName: SpanInstrumentationName = INSTRUMENTATION_NAMES.MCP, ): T { if ( isObject(message) && @@ -505,6 +508,7 @@ export function traceMCPSend( message, options, config, + instrumentationName, ); } let initialization: @@ -624,6 +628,7 @@ function traceMCPOutgoingNotification( message: Record, options: unknown, config: MCPIntegrationConfig, + instrumentationName: SpanInstrumentationName, ): T { if (isAutoInstrumentationSuppressed()) return call(); const span = runInstrumentation(() => { @@ -671,7 +676,7 @@ function traceMCPOutgoingNotification( : {}), }, }, - INSTRUMENTATION_NAMES.MCP, + instrumentationName, ), ), ); diff --git a/js/src/span-origin.ts b/js/src/span-origin.ts index 19998e780..b2432167c 100644 --- a/js/src/span-origin.ts +++ b/js/src/span-origin.ts @@ -20,6 +20,7 @@ export const INSTRUMENTATION_NAMES = { CURSOR_SDK: "cursor-sdk", DEEPSEEK_HARNESS: "deepseek-harness", EVE: "eve", + FASTMCP: "fastmcp", FLUE: "flue", GENKIT: "genkit", GITHUB_COPILOT: "github-copilot", diff --git a/js/src/vendor-sdk-types/fastmcp.ts b/js/src/vendor-sdk-types/fastmcp.ts new file mode 100644 index 000000000..8d601a7ec --- /dev/null +++ b/js/src/vendor-sdk-types/fastmcp.ts @@ -0,0 +1,11 @@ +import type { MCPProtocol, MCPTransport } from "./mcp"; + +/** Vendored FastMCP 3.35+ and 4.x surface used by instrumentation. */ +export interface FastMCPSession { + readonly server: MCPProtocol; + connect(transport: MCPTransport): Promise; +} + +export interface FastMCPModule { + FastMCPSession: { prototype: FastMCPSession }; +} diff --git a/js/src/wrappers/fastmcp.test.ts b/js/src/wrappers/fastmcp.test.ts new file mode 100644 index 000000000..290fe83ad --- /dev/null +++ b/js/src/wrappers/fastmcp.test.ts @@ -0,0 +1,167 @@ +import { + afterEach, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, +} from "vitest"; +import { debugLogger } from "../debug-logger"; +import { _exportsForTestingOnly, initLogger, traced } from "../logger"; +import { configureNode } from "../node/config"; +import { registry } from "../instrumentation/registry"; +import type { + MCPProtocol, + MCPRequest, + MCPRequestHandler, + MCPTransport, +} from "../vendor-sdk-types/mcp"; +import { wrapFastMCP } from "./fastmcp"; + +configureNode(); + +function createModule() { + class FastMCPSession { + readonly server: MCPProtocol = { + _requestHandlers: new Map([ + [ + "tools/call", + async () => + traced( + async () => ({ content: [{ type: "text", text: "sunny" }] }), + { name: "lookup" }, + ), + ], + ]), + setRequestHandler() {}, + connect: (transport) => { + Object.assign(this.server, { transport }); + transport.onmessage = async (message) => { + const request = message as MCPRequest; + const result = await this.server._requestHandlers!.get( + request.method, + )!(request, { requestId: request.id }); + return transport.send({ id: request.id, result }); + }; + return transport.start(); + }, + }; + connect(transport: MCPTransport): Promise { + return this.server.connect(transport) as Promise; + } + } + return { FastMCPSession }; +} + +describe("FastMCP wrapper", () => { + let backgroundLogger: ReturnType< + typeof _exportsForTestingOnly.useTestBackgroundLogger + >; + + beforeAll(async () => { + await _exportsForTestingOnly.simulateLoginForTests(); + }); + beforeEach(() => { + registry.disable(); + registry.configure({ integrations: { mcp: false, fastmcp: true } }); + registry.enable(); + backgroundLogger = _exportsForTestingOnly.useTestBackgroundLogger(); + initLogger({ + projectName: "fastmcp.test.ts", + projectId: "test-project-id", + }); + }); + afterEach(() => { + vi.restoreAllMocks(); + _exportsForTestingOnly.clearTestBackgroundLogger(); + }); + + it.each([false, true])( + "traces queued requests and nested context with a null prototype: %s", + async (nullPrototype) => { + const module: ReturnType = Object.assign( + Object.create(nullPrototype ? null : Object.prototype), + createModule(), + ); + expect(wrapFastMCP(module)).toBe(module); + wrapFastMCP(module); + const session = new module.FastMCPSession(); + const send = vi.fn(); + const transport: MCPTransport = { + start() { + return this.onmessage!({ + id: 1, + method: "tools/call", + params: { name: "weather", arguments: { city: "Vienna" } }, + }); + }, + send, + }; + await session.connect(transport); + expect(send).toHaveBeenCalledOnce(); + const spans = (await backgroundLogger.drain()) as Record[]; + const request = spans.find( + (span) => span.span_attributes.name === "tools/call weather", + )!; + expect(spans).toHaveLength(2); + expect(request.input).toEqual({ city: "Vienna" }); + expect(request.output).toEqual({ + content: [{ type: "text", text: "sunny" }], + }); + expect( + spans.find((span) => span.span_attributes.name === "lookup") + ?.span_parents, + ).toEqual([request.span_id]); + }, + ); + + it("preserves the receiver, arguments, and promise identity", async () => { + const module = createModule(); + const result = Object.assign(Promise.resolve(), { helper: () => "value" }); + const original = vi + .spyOn(module.FastMCPSession.prototype, "connect") + .mockReturnValue(result); + wrapFastMCP(module); + const session = new module.FastMCPSession(); + const transport = { start() {}, send() {} }; + expect(session.connect(transport)).toBe(result); + expect(original).toHaveBeenCalledWith(transport); + expect(original.mock.contexts).toEqual([session]); + await result; + }); + + it("passes through when the FastMCP integration is disabled", async () => { + registry.disable(); + registry.configure({ integrations: { mcp: false, fastmcp: false } }); + registry.enable(); + const module = wrapFastMCP(createModule()); + const session = new module.FastMCPSession(); + const transport = { start() {}, send() {} }; + await session.connect(transport); + expect(session.server.transport).toBe(transport); + expect(await backgroundLogger.drain()).toEqual([]); + }); + + it("preserves synchronous errors from connect", () => { + const module = createModule(); + const error = new Error("connect failed"); + vi.spyOn(module.FastMCPSession.prototype, "connect").mockImplementation( + () => { + throw error; + }, + ); + const session = new (wrapFastMCP(module).FastMCPSession)(); + expect(() => session.connect({ start() {}, send() {} })).toThrow(error); + }); + + it("returns unsupported values unchanged", () => { + const warn = vi + .spyOn(debugLogger.notice, "warn") + .mockImplementation(() => true); + for (const value of [null, {}, { FastMCPSession: () => {} }]) { + expect(wrapFastMCP(value)).toBe(value); + } + expect(warn).toHaveBeenCalledTimes(3); + }); +}); diff --git a/js/src/wrappers/fastmcp.ts b/js/src/wrappers/fastmcp.ts new file mode 100644 index 000000000..3411682ba --- /dev/null +++ b/js/src/wrappers/fastmcp.ts @@ -0,0 +1,49 @@ +import { debugLogger } from "../debug-logger"; +import { fastMCPChannels } from "../instrumentation/plugins/fastmcp-interceptors"; +import type { + FastMCPModule, + FastMCPSession, +} from "../vendor-sdk-types/fastmcp"; + +const wrapped = Symbol.for("braintrust.fastmcp.connect-wrapper"); + +/** + * Trace FastMCP 3.35+ and 4.x servers with Braintrust. + * Wrap the module before starting servers. This installs an idempotent session + * hook for all servers created by that module, including stateless HTTP requests. + * Content capture is controlled by `integrations.fastmcp.captureContent`. + * + * @example + * ```ts + * import * as fastmcp from "fastmcp"; + * const { FastMCP } = wrapFastMCP(fastmcp); + * const server = new FastMCP({ name: "my-server", version: "1.0.0" }); + * ``` + */ +export function wrapFastMCP(module: T): T { + const sessionClass = + module && typeof module === "object" + ? Reflect.get(module, "FastMCPSession") + : undefined; + if ( + typeof sessionClass !== "function" || + typeof sessionClass.prototype?.connect !== "function" + ) { + debugLogger.notice.warn("Unsupported FastMCP module. Not wrapping."); + return module; + } + const fastmcp = module as unknown as FastMCPModule; + const prototype = fastmcp.FastMCPSession.prototype; + const original = prototype.connect; + if (Reflect.get(original, wrapped)) return module; + + const connect: FastMCPSession["connect"] = function ( + this: FastMCPSession, + ...args + ) { + return fastMCPChannels.sessionConnect.invoke(original, this, args, {}); + }; + Object.defineProperty(connect, wrapped, { value: true }); + prototype.connect = connect; + return module; +} diff --git a/js/tests/auto-instrumentations/fastmcp.test.ts b/js/tests/auto-instrumentations/fastmcp.test.ts new file mode 100644 index 000000000..522670251 --- /dev/null +++ b/js/tests/auto-instrumentations/fastmcp.test.ts @@ -0,0 +1,49 @@ +import { describe, expect, it } from "vitest"; +import { InstrumentationMatcher } from "../../src/auto-instrumentations/orchestrion-js"; +import { fastMCPConfigs } from "../../src/auto-instrumentations/configs/fastmcp"; +import { fastMCPChannels } from "../../src/instrumentation/plugins/fastmcp-interceptors"; + +describe("FastMCP session transformation", () => { + it.each(["3.35.0", "4.0.0", "4.23.7"])( + "invokes the session hook for %s CJS and ESM chunks", + async (version) => { + for (const extension of ["js", "cjs"]) { + const transformer = new InstrumentationMatcher( + fastMCPConfigs, + ).getTransformer("fastmcp", version, `dist/chunk-ABC123.${extension}`)!; + const source = ` + var FastMCPSession = class { + #server = { connect(transport) { return transport; } }; + get server() { return this.#server; } + async connect(transport) { return this.#server.connect(transport); } + }; + globalThis.testSession = new FastMCPSession(); + `; + const result = transformer.transform( + source, + extension === "js" ? "esm" : "cjs", + ); + const calls: unknown[] = []; + const remove = fastMCPChannels.sessionConnect.intercept( + (target, receiver, args) => { + calls.push(receiver); + return Reflect.apply(target, receiver, args); + }, + ); + try { + const scope = globalThis as typeof globalThis & { + testSession?: { connect(value: unknown): Promise }; + }; + Function(result.code)(); + const session = scope.testSession!; + const transport = { start() {}, send() {} }; + expect(await session.connect(transport)).toBe(transport); + expect(calls).toEqual([session]); + delete scope.testSession; + } finally { + remove(); + } + } + }, + ); +}); From 9f3c2a1f5c42cff1de4ed17dc5b56bb9cb7f8b7c Mon Sep 17 00:00:00 2001 From: lforst <8118419+lforst@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:42:26 +0000 Subject: [PATCH 2/2] Update PR #2695 --- .changeset/add-fastmcp-tracing.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/add-fastmcp-tracing.md diff --git a/.changeset/add-fastmcp-tracing.md b/.changeset/add-fastmcp-tracing.md new file mode 100644 index 000000000..8ec091a70 --- /dev/null +++ b/.changeset/add-fastmcp-tracing.md @@ -0,0 +1,5 @@ +--- +"braintrust": minor +--- + +feat: Add `fastmcp` tracing