Skip to content

Match w3c propagation with MCP csharp-sdk and openinference #2

@codefromthecrypt

Description

@codefromthecrypt

modelcontextprotocol/modelcontextprotocol#414 describes use of request.params._meta which is used here for w3c trace context. However, the w3c fields are under a sub-field request.params._meta.__traceContext here. This means it will have a propagation break with libraries that use request.params._meta plainly, including the official csharp-sdk and openinference MCP instrumentations.

I understand there may be concern about field overlaps, but this concern is normal in otel carriers and well understood. If we can switch to request.params._meta then this project can be compatible with other libraries and re-use any documentation emerging in otel.

Here are a couple known use of request.params._meta, e.g. request.params._meta.traceparent which could join traces here, if it followed the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions