traceloop / traceloop/openllmetry

๐Ÿ› Bug Report: Unsupported mcp==2.x module 'streamablehttp_client'

Open
#4,413 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.4k
Forks
1.1k
Avg merge
8d 14h
Merged PRs (30d)
2

Description

Which component is this bug for?

Traceloop SDK

๐Ÿ“œ Description

https://github.com/traceloop/openllmetry/blob/main/packages/opentelemetry-instrumentation-mcp/opentelemetry/instrumentation/mcp/instrumentation.py

register_post_import_hook(
            lambda _: wrap_function_wrapper(
                "mcp.client.streamable_http",
                "streamablehttp_client",
                self._transport_wrapper(tracer),
            ),
            "mcp.client.streamable_http",
        )

The mcp.client.streamable_http module is removed from mcp-sdk 2.x

With mcp==2.0.0 version, the traceloop fail to bootstrap with error

Error initializing MCP instrumentor: module 'mcp.client.streamable_http' has no attribute 'streamablehttp_client'

๐Ÿ‘Ÿ Reproduction steps

mcp>=2.0.0
Traceloop==0.62.3
opentelemetry-api==1.44.0
opentelemetry-sdk==1.44.0

Start mcp server

๐Ÿ‘ Expected behavior

Start stable with instrumentation enabled

๐Ÿ‘Ž Actual Behavior with Screenshots

Error initializing MCP instrumentor: module 'mcp.client.streamable_http' has no attribute 'streamablehttp_client'

๐Ÿค– Python Version

3.12

๐Ÿ“ƒ Provide any additional context for the Bug.

No response

๐Ÿ‘€ Have you spent some time to check if this bug has been raised before?
  • I checked and didn't find similar issue
Are you willing to submit PR?

Yes I am willing to submit a PR!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up โ€” it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/opentelemetry-instrumentation-mcp/opentelemetry/instrumentation/mcp/instrumentation.py and inspect how the MCP client hook targets streamablehttp_client. Compare that entry point with mcp==2.0.0 using the reported dependency versions. Done means the Traceloop SDK bootstraps with instrumentation enabled and starts without the reported attribute error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.