Skip to content

docs(js): Drop manual wrapMcpServerWithSentry from MCP setup - #19881

Merged
andreiborza merged 2 commits into
masterfrom
docs/js-mcp-auto-instrumentation
Oct 9, 2026
Merged

andreiborza merged 2 commits into
masterfrom
docs/js-mcp-auto-instrumentation

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Starting with SDK 11.1.0, the new default mcpServerIntegration instruments every McpServer (@modelcontextprotocol/server 2.x and @modelcontextprotocol/sdk >=1.9.0) automatically, so the setup docs no longer need to tell people to wrap their server by hand (getsentry/sentry-javascript#24529).

The MCP Monitoring setup now shows a plain new McpServer(...). The manual wrap is kept as the fallback for SDKs older than 11.1.0 or apps without automatic instrumentation, and it is still documented as the way to set recordInputs/recordOutputs for a single server, since a later wrap overrides the auto-wrap's defaults.

Cloudflare doesn't get the integration, so it now has its own setup include that still wraps the server. The Hono include covers both cases. Bun and Next.js get a short note: on Bun this only works when you build with the Sentry Bun plugin, and on Next.js only in the Node.js runtime, not Edge. I also updated the product getting-started page and the data-collected page to match.

via Andrei Borza.

--

View Junior Session [Sentry]

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Oct 9, 2026 2:18pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Oct 9, 2026 2:18pm UTC

Request Review

@github-actions github-actions Bot added the Priority: Needs Triage The PR description is missing valid priority information label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Please update the IS YOUR CHANGE URGENT? section of the PR description:

  • Select exactly one option.
  • If you selected an urgent or other deadline, provide the date as YYYY-MM-DD.

This information helps the Docs team prioritize your review.

@cursor

cursor Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

The change updates setup copy on the affected pages. Readers now see automatic instrumentation as the default. The plan checks client errors, HTTP 5xx, and pageload time on those pages. An issue escalates when errors or 5xx rise, or when pageload time rises.

Monitoring in production

Services: sentry-docs.

Mention @change-monitor in a comment to update the plan.

Plan

What changed

The MCP setup pages now show a plain McpServer constructor as the default. Cloudflare pages still tell readers to wrap the server by hand. sentry-docs must deploy before this copy is live.

Risk

Wrong copy can tell readers to skip the wrap on Cloudflare or on older SDKs. A broken MDX include can fail render for JavaScript MCP setup pages. The blast radius is those setup pages and the getting-started page.

Intended effect

This copy change has no queryable effect in Sentry. Page loads do not prove the new sentences rendered. Absent looks like any successful page load. Telemetry cannot show the new copy. The executor cannot fill this axis from Sentry.

Regression watch

Pageload counts are sampled spans at 30 percent. Do not treat them as full traffic. The 24 hour mcp-monitoring sample has 13 spans. That p95 value may move with traffic.

The 7 day error window includes 29 events titled Event Event captured as promise rejection. That title did not appear in the last 24 hours.

Signal Query Baseline Window Source Rule
Client errors on changed pages environment:production AND (url:*mcp-monitoring* OR url:*mcp-servers/getting-started*) 1 event in 24h. 30 events in 7d 24h: 2026-10-08T13:51:35Z to 2026-10-09T13:51:35Z. 7d: 2026-10-02T13:51:35Z to 2026-10-09T13:51:35Z Sentry org sentry, project docs Hold 24h count in 0-30 events. Escalate if 24h count rises above 30, or if new titles dominate
HTTP 5xx on changed pages environment:production AND http.status_code:>=500 AND (http.url:*mcp-monitoring* OR http.url:*mcp-servers/getting-started*) 0 events 2026-10-02T13:51:35Z to 2026-10-09T13:51:35Z Sentry org sentry, project docs Stay at 0. Escalate if count rises above 0
mcp-monitoring pageload p95 environment:production AND (span.op:pageload OR span.op:navigation) AND http.url:*mcp-monitoring* then p95(span.duration) 7.2-11.9s 24h p95 7207ms. 7d p95 11865ms. Windows as above Sentry org sentry, project docs Hold in 7.2-11.9s. Escalate if p95 rises above 11.9s
getting-started pageload p95 environment:production AND (span.op:pageload OR span.op:navigation) AND http.url:*mcp-servers/getting-started* then p95(span.duration) 3.2-4.7s 24h p95 3231ms. 7d p95 4692ms. Windows as above Sentry org sentry, project docs Hold in 3.2-4.7s. Escalate if p95 rises above 4.7s

Transaction name is /:path*?. Filter by http.url or url. Do not filter these pages by transaction name.

Not observable

The new setup sentences are not in telemetry. No signal shows whether Cloudflare still shows the manual wrap.

Comment thread docs/platforms/javascript/common/mcp-monitoring/index.mdx Outdated
@andreiborza
andreiborza merged commit 7eb0fa6 into master Oct 9, 2026
26 checks passed
@andreiborza
andreiborza deleted the docs/js-mcp-auto-instrumentation branch October 9, 2026 14:31
@cursor

cursor Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Verified in production

  • The live setup pages now show a plain McpServer constructor as the default.

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — 9e8e3383 Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Needs Triage The PR description is missing valid priority information

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants