docs(cloudflare): Recommend span streaming for MCP - #19057
Open
betegon wants to merge 2 commits into
Open
Conversation
Cloudflare MCP work can outlive the HTTP response. Document stream mode as the supported way to retain those spans, while keeping forceTransaction as the static-lifecycle fallback. Co-Authored-By: OpenAI Codex <codex@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
betegon
force-pushed
the
docs/cloudflare-mcp-span-streaming
branch
from
August 14, 2026 14:38
c549a0a to
6c74833
Compare
betegon
force-pushed
the
docs/cloudflare-mcp-span-streaming
branch
from
August 14, 2026 15:03
6c74833 to
83fb57c
Compare
betegon
force-pushed
the
docs/cloudflare-mcp-span-streaming
branch
from
August 14, 2026 15:35
83fb57c to
f7e2413
Compare
betegon
force-pushed
the
docs/cloudflare-mcp-span-streaming
branch
from
August 14, 2026 15:47
f7e2413 to
ea01e43
Compare
betegon
force-pushed
the
docs/cloudflare-mcp-span-streaming
branch
from
August 14, 2026 16:30
ea01e43 to
736ed33
Compare
betegon
marked this pull request as ready for review
August 14, 2026 16:51
Place MCP Monitoring alongside Agent Tracing across supported JavaScript guides and document the explicit server wrapper required for instrumentation. Keep Cloudflare span streaming as a separate delivery setting. Co-Authored-By: OpenAI Codex <codex@openai.com>
betegon
force-pushed
the
docs/cloudflare-mcp-span-streaming
branch
from
August 14, 2026 17:12
736ed33 to
0b580dd
Compare
sergical
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DESCRIBE YOUR PR
Cloudflare MCP work can finish after the Worker returns its HTTP response. In the static trace lifecycle, those late spans depend on a transaction snapshot that may already have been sent.
We verified this with two deployed Cloudflare Workers running byte-identical MCP
2026-07-28bundles against the published JavaScript SDK.traceLifecycle: "static"lost the late child, whiletraceLifecycle: "stream"recorded it exactly once with the MCP operation as its parent.This promotes MCP Monitoring to a top-level platform feature alongside Agent Tracing across supported JavaScript guides. Each framework page now shows the required
wrapMcpServerWithSentrysetup directly, including the runtime-specific imports for Hono. The Cloudflare page makes clear that wrapping the MCP server enables MCP instrumentation, whiletraceLifecycle: "stream"controls how the resulting spans are delivered. The Agent Tracing overview keeps its contextual MCP link, and the previous Tracing → Instrumentation → Instrument MCP Servers URL redirects to the new feature route.The general Cloudflare
waitUntil()limitation now recommends stream mode first.forceTransactionremains documented as the fallback for applications that need to keep the static lifecycle.Related to getsentry/sentry-javascript#23427.
IS YOUR CHANGE URGENT?
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST