Skip to content

Conversation

@constantinius
Copy link
Contributor

@constantinius constantinius commented Oct 20, 2025

@linear
Copy link

linear bot commented Oct 20, 2025

@constantinius constantinius requested review from a team October 20, 2025 15:07
from typing import Any

import sentry_sdk
from sentry_sdk.integrations.mcp import MCPIntegration

Choose a reason for hiding this comment

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

Bug: The code imports MCPIntegration from sentry_sdk.integrations.mcp, but this class and module do not exist, causing an import error on startup.
(Severity: Critical 0.90 | Confidence: 0.98)

🔍 Detailed Analysis

The code attempts to import MCPIntegration from sentry_sdk.integrations.mcp in test-mcp/main_lowlevel.py, test-mcp/main_fastmcp.py, and test-mcp/main.py. However, neither the MCPIntegration class nor the sentry_sdk.integrations.mcp module exists in the accessible codebase. Executing any of these scripts will raise an ImportError or ModuleNotFoundError, which will prevent the application from starting.

💡 Suggested Fix

Implement the MCPIntegration class within the sentry-python SDK. Alternatively, remove the test files that import this non-existent class until the implementation is available.

🤖 Prompt for AI Agent
Fix this bug. In test-mcp/main_lowlevel.py at line 19: The code attempts to import
`MCPIntegration` from `sentry_sdk.integrations.mcp` in `test-mcp/main_lowlevel.py`,
`test-mcp/main_fastmcp.py`, and `test-mcp/main.py`. However, neither the
`MCPIntegration` class nor the `sentry_sdk.integrations.mcp` module exists in the
accessible codebase. Executing any of these scripts will raise an `ImportError` or
`ModuleNotFoundError`, which will prevent the application from starting.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The SDK is not yet released, but this PR assists in releasing it.

@linear
Copy link

linear bot commented Oct 21, 2025

Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

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

💪🏻

- Complex error handling requirements
- Performance-critical applications

**See [COMPARISON.md](./COMPARISON.md) for detailed side-by-side code examples.**
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no COMPARISON.md

@sentrivana sentrivana merged commit a291aba into main Oct 28, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants