getsentry / getsentry/sentry-python

Propagate context variables in the SSE transport within the MCP integration

Open
#6,593 2 comments 0 reactions 0 assignees View on GitHub
MCP Python
Dominant language
Python
Stars
2.2k
Forks
669
Avg merge
1d 40m
Merged PRs (30d)
212

Description

Related: [https://github.com/getsentry/sentry-python/pull/6583#discussion_r3427253810]()

See `test_sse_transport_detection_v2` test in `test_mcp.py`as a reference to this behaviour.

Because we don't propagate these correctly, traces lose everything that's set on the isolation and current scopes, we lose the parent-child span relationship, attributes that were set are lost, andwe get two traces instead of one.

**Note:** Rather than working to propagate the context variables, we may want to consider dropping support for the SSE transport as current data points to most users using the HTTP transport.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.