Repository navigation
Conversation
size-limit report 📦Compared: 633d295 (PR test merge using develop at e02e745) Against: e02e745 (develop) · base run #65588 ✅ Baseline matches: this diff contains only this PR's changes.
|
9b2892f to
914fd50
Compare
914fd50 to
ead1950
Compare
Use `@sentry/conventions/attributes` for registered MCP keys, including
all singleton and indexed result fields. The branch now uses published
conventions `0.27.0` from `develop`, so both local result prefixes can
be removed.
Before, the SDK constructed `mcp.tool.result.0.content` from a local
prefix. After, `MCP_TOOL_RESULT_KEY_CONTENT.replace('<key>', '0')`
produces that same key. Singleton keys, values, original array indexes,
and input/output capture behavior remain unchanged. Deprecated
tool-result fields stay emitted for compatibility; this change adds no
aliases or backfill.
This is the mechanical base for network metadata (#24506), OAuth
attribution (#24508), and canonical OpenTelemetry attributes (#25060).
The latter separately adds complete serialized results in
`gen_ai.tool.call.result`.
ead1950 to
f965bba
Compare
|
👋 @mydea, @andreiborza — Please review this PR when you get a chance! |
|
This PR is too large for Bugbot to review. It changes 67,411 lines and 3,660,613 characters. Split the change into smaller pull requests to get a review. |
|
bugbot run verbose=true |
|
Bugbot request id: eea33c32-93f0-44cf-b25d-0cd32c7cc2f6 |
Bugbot rules debugBugbot rules included in this run
Bugbot request id: eea33c32-93f0-44cf-b25d-0cd32c7cc2f6 |
|
bugbot run verbose=true |
|
Bugbot request id: f1ecc5b7-44f7-4fb2-935c-3b703c247d9a |
Bugbot rules debugBugbot rules included in this run
Bugbot request id: f1ecc5b7-44f7-4fb2-935c-3b703c247d9a |
| * | ||
| * @param mcpServerInstance - MCP server instance to instrument | ||
| * @param options - Optional configuration for recording inputs and outputs | ||
| * @param options - Optional capture and OAuth client attribution configuration |
There was a problem hiding this comment.
I think this diff is leaving to little information.
| * @param options - Optional capture and OAuth client attribution configuration | |
| * @param options - Optional config for recording inputs/outputs and OAuth client attribution configuration |
JPeer264
left a comment
There was a problem hiding this comment.
LGTM. 2 tests are failing, but it seems not because of this PR
| getCurrentScope().setClient(createMockClient(false)); | ||
| vi.spyOn(tracing, 'startInactiveSpan').mockImplementation(options => { | ||
| const span = new SentrySpan(options); | ||
| spans.push(span); |
There was a problem hiding this comment.
l: Since the tests within one test file are usually not executed in parallel it should be safe to have just one global span, rather than an array: let inactiveSpan. Wdyt?
| const onmessage = transport.onmessage; | ||
| const result = { result: 'dispatch completed' }; | ||
| onmessage.mockReturnValue(result); | ||
| transports.push(transport); |
There was a problem hiding this comment.
l: Instead of pushing the transport globally into one array we could do something different:
let mockedTransport;
beforeEach(() => {
mockedTransport = createMockTransport();
});
afterEach(() => {
mockedTransport.onclose();
});With that we wouldn't forget for new tests to push it to the global array
0cb6dd6 to
2aa8392
Compare
|
FYI I rebased this PR, since this PR was still running the namespace runners and we removed them for now |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2aa8392. Configure here.
Optional E2E testsSome optional checks were not successful. They do not block the merge. 8 not successful, 49 successful. See the run.
Successful checks
|

OAuth registration can identify a different application from MCP
clientInfo, but transportAuthInfohas no standard client name. Add an opt-ingetOAuthClientNameresolver that records the registered name asmcp.auth.client.name, independently ofmcp.client.name.For example, when a registered application named
Example Desktopconnects through a client identifying asexample-connector, before the span contains onlymcp.client.name = "example-connector". After configuring the resolver, it also containsmcp.auth.client.name = "Example Desktop".Resolve the name once per incoming request, including discovery and unsupported methods. The callback receives
clientIdand application-definedextrametadata when available and may read request-scoped authentication context. Only the returned name is recorded; resolver failures leave dispatch intact. Preserve the wrapper's existing first-explicit-value option behavior. Real HTTP coverage exercises both MCP SDK majors in ESM/CJS, concurrent requests, and missing identities.#25059 is merged; this branch is rebased on develop and imports
MCP_AUTH_CLIENT_NAMEfrom published@sentry/conventions@0.27.0. The conventions publication blocker is resolved. This identity distinction follows MCP client registration. Network metadata (#24506) and canonical attributes (#25060) remain separate changes.Validated the 48-project SDK build, formatting and lint, 151 MCP unit tests, and ten real MCP SDK v1/v2 integration tests after rebase.