Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/populate_tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@
"package": "loguru",
"num_versions": 2,
},
"mcp": {
"package": "mcp",
"deps": {
"*": ["pytest-asyncio", "mcp>=1.15.0"],
},
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Redundant Dependency Causes Installation Conflicts

The mcp integration configuration in scripts/populate_tox/config.py includes mcp>=1.15.0 in its deps list. This is redundant, as the package field already specifies mcp. This general dependency can conflict with specific mcp==X.Y.Z versions in the generated tox.ini, potentially leading to incorrect package installations during tests. Other integrations in this file only list external testing dependencies.

Additional Locations (1)

Fix in Cursor Fix in Web

"openai-base": {
"package": "openai",
"integration_name": "openai",
Expand Down
4 changes: 4 additions & 0 deletions scripts/populate_tox/releases.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@
{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "litestar", "requires_python": "<4.0,>=3.8", "version": "2.18.0", "yanked": false}}
{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "litestar", "requires_python": "<4.0,>=3.8", "version": "2.6.4", "yanked": false}}
{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: System :: Logging"], "name": "loguru", "requires_python": "<4.0,>=3.5", "version": "0.7.3", "yanked": false}}
{"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13"], "name": "mcp", "requires_python": ">=3.10", "version": "1.15.0", "yanked": false}}
{"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13"], "name": "mcp", "requires_python": ">=3.10", "version": "1.16.0", "yanked": false}}
{"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13"], "name": "mcp", "requires_python": ">=3.10", "version": "1.17.0", "yanked": false}}
{"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13"], "name": "mcp", "requires_python": ">=3.10", "version": "1.18.0", "yanked": false}}
{"info": {"classifiers": ["Intended Audience :: Developers", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.7.1", "version": "1.0.1", "yanked": false}}
{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.8", "version": "1.102.0", "yanked": false}}
{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "openai", "requires_python": ">=3.8", "version": "1.109.1", "yanked": false}}
Expand Down
1 change: 1 addition & 0 deletions scripts/split_tox_gh_actions/split_tox_gh_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"langchain-notiktoken",
"langgraph",
"litellm",
"mcp",
"openai-base",
"openai-notiktoken",
"openai_agents",
Expand Down
85 changes: 85 additions & 0 deletions sentry_sdk/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,90 @@ class SPANDATA:
Example: "MainThread"
"""

MCP_TOOL_NAME = "mcp.tool.name"
"""
The name of the MCP tool being called.
Example: "get_weather"
"""

MCP_PROMPT_NAME = "mcp.prompt.name"
"""
The name of the MCP prompt being retrieved.
Example: "code_review"
"""

MCP_RESOURCE_URI = "mcp.resource.uri"
"""
The URI of the MCP resource being accessed.
Example: "file:///path/to/resource"
"""

MCP_METHOD_NAME = "mcp.method.name"
"""
The MCP protocol method name being called.
Example: "tools/call", "prompts/get", "resources/read"
"""

MCP_REQUEST_ID = "mcp.request.id"
"""
The unique identifier for the MCP request.
Example: "req_123abc"
"""

MCP_TOOL_RESULT_CONTENT = "mcp.tool.result.content"
"""
The result/output content from an MCP tool execution.
Example: "The weather is sunny"
"""

MCP_TOOL_RESULT_CONTENT_COUNT = "mcp.tool.result.content_count"
"""
The number of items/keys in the MCP tool result.
Example: 5
"""

MCP_TOOL_RESULT_IS_ERROR = "mcp.tool.result.is_error"
"""
Whether the MCP tool execution resulted in an error.
Example: True
"""

MCP_PROMPT_RESULT_MESSAGE_CONTENT = "mcp.prompt.result.message_content"
"""
The message content from an MCP prompt retrieval.
Example: "Review the following code..."
"""

MCP_PROMPT_RESULT_MESSAGE_ROLE = "mcp.prompt.result.message_role"
"""
The role of the message in an MCP prompt retrieval (only set for single-message prompts).
Example: "user", "assistant", "system"
"""

MCP_PROMPT_RESULT_MESSAGE_COUNT = "mcp.prompt.result.message_count"
"""
The number of messages in an MCP prompt result.
Example: 1, 3
"""

MCP_RESOURCE_PROTOCOL = "mcp.resource.protocol"
"""
The protocol/scheme of the MCP resource URI.
Example: "file", "http", "https"
"""

MCP_TRANSPORT = "mcp.transport"
"""
The transport method used for MCP communication.
Example: "pipe" (stdio), "tcp" (HTTP/WebSocket/SSE)
"""

MCP_SESSION_ID = "mcp.session.id"
"""
The session identifier for the MCP connection.
Example: "a1b2c3d4e5f6"
"""


class SPANSTATUS:
"""
Expand Down Expand Up @@ -845,6 +929,7 @@ class OP:
WEBSOCKET_SERVER = "websocket.server"
SOCKET_CONNECTION = "socket.connection"
SOCKET_DNS = "socket.dns"
MCP_SERVER = "mcp.server"


# This type exists to trick mypy and PyCharm into thinking `init` and `Client`
Expand Down
1 change: 1 addition & 0 deletions sentry_sdk/integrations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def iter_default_integrations(with_auto_enabling_integrations):
"launchdarkly": (9, 8, 0),
"litellm": (1, 77, 5),
"loguru": (0, 7, 0),
"mcp": (1, 15, 0),
"openai": (1, 0, 0),
"openai_agents": (0, 0, 19),
"openfeature": (0, 7, 1),
Expand Down
Loading
Loading