Skip to content

Comments

OpenTelemetry extract trace context from _meta in incoming requests#2133

Draft
aabmass wants to merge 4 commits intomodelcontextprotocol:mainfrom
aabmass:otel-propagation-extract
Draft

OpenTelemetry extract trace context from _meta in incoming requests#2133
aabmass wants to merge 4 commits intomodelcontextprotocol:mainfrom
aabmass:otel-propagation-extract

Conversation

@aabmass
Copy link
Contributor

@aabmass aabmass commented Feb 24, 2026

Part of #421

Depends on

Motivation and Context

Extract's OTel context from _meta. This is what lets span parent/child relationship happen.

How Has This Been Tested?

New test cases

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

See if tests still fail
This fix covers in memory, streamable http, and sse transports.
This works for both incoming client->server requests and server->client requests like MCP Sampling.
@aabmass aabmass changed the title Otel propagation extract OpenTelemetry extract trace context from _meta in incoming requests Feb 24, 2026
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