Skip to content

MCP request.params._meta support for #1348

@codefromthecrypt

Description

@codefromthecrypt

Description:

Right now we document these two mapping headers:

  • OTEL_AIGW_METRICS_REQUEST_HEADER_ATTRIBUTES: Example: x-team-id:team.id,x-user-id:user.id
  • OTEL_AIGW_SPAN_REQUEST_HEADER_ATTRIBUTES: Example: x-session-id:session.id,x-user-id:user.id

Semantically, at MCP, these would map to request.params._meta as propagation fields are comingled with trace identifiers there, just like in HTTP headers.

While #1342 will handle session-scoped mappings, it cannot solve request scoped. We should handle that at some point because soon MCP SDKs will expose request params generically.

Relevant Links:

#1342 - adds header support for MCP

The below are a partial list of SDKs which will certainly make meta propagation easier and therefore used in frameworks soon!
modelcontextprotocol/csharp-sdk#712
modelcontextprotocol/modelcontextprotocol#1318
modelcontextprotocol/python-sdk#1231

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions