Skip to content

docs(mcp): distinguish native tracing from context propagation - #537

Merged
nik13 merged 1 commit into
devfrom
docs/mcp-python-native-route
Nov 2, 2026
Merged

nik13 merged 1 commit into
devfrom
docs/mcp-python-native-route

Conversation

@nik13

@nik13 nik13 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Correct the MCP package README's claim that the propagation instrumentor automatically traces all requests. MCPInstrumentor creates no spans. Recommend MCP 2.3+ native OpenTelemetry for new Python setups and retain the released MCP 1.x propagation/lifecycle instructions.

  • Link the runnable native guide in docs(mcp): add native Python client and server tracing guide docs#1087 (merge the guide before this README link).
  • Remove unnecessary OpenAI installation/key requirements from the propagation setup.
  • Explain native error-content controls and the difference between propagation and span creation.
  • Add a failing-first README contract test. No runtime code, package constraints, version, or release mapping changes.

Validation

All Python test processes ran under a macOS outbound-network-denied sandbox, with loopback allowed and a scrubbed environment.

  • Before: the new test fails on the automatic-all-requests sentence.
  • After: 48 tests pass on MCP 1.8.1 + Pydantic 2.11.10, and 48 pass on latest MCP 2.3.0. These include real stdio/HTTP lifecycle, propagation, tuple compatibility, and dependency tests. The floor has the known upstream lifespan forward-reference warning.
  • The companion native guide's exact snippets pass against a loopback OTLP/HTTP protobuf receiver in fresh environments without traceAI, on Python 3.11 and 3.13. It checks successful and failing tool calls, four concurrent calls, one client/server pair per tool call, propagated IDs/parentage, tool attributes, project resources, synthetic auth headers, and shutdown export.
  • release_plan.py --check: 129 packages consistent. git diff --check passes.

Existing work and limits

#311 already merged the runtime repairs proposed in #221/#222; current-dev tests confirm those defects no longer reproduce. This PR does not repeat or alter those fixes, TypeScript #403/#482, or the separate Python FastMCP package guide.

Only published dependencies are used (MCP 2.3.0 and traceAI-mcp 0.1.3 verified on PyPI). No registry publish, workflow dispatch, merge, real credentials, or Cloud ingestion/UI test was performed. Native tool classification was checked against the backend's execute_tool mapping; loopback export is not a claim of live Cloud acceptance. No product E2E applies to a package README-only change.

🤖 Generated with Claude Code

Co-Authored-By: Claude Code <noreply@anthropic.com>
@nik13
nik13 merged commit 9efd48b into dev Nov 2, 2026
20 checks passed
@nik13
nik13 deleted the docs/mcp-python-native-route branch November 2, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant