diff --git a/src/sentry/constants.py b/src/sentry/constants.py index fe376a2fe6cff5..3bb52efbff8776 100644 --- a/src/sentry/constants.py +++ b/src/sentry/constants.py @@ -640,6 +640,7 @@ class InsightModules(Enum): QUEUE = "queue" LLM_MONITORING = "llm_monitoring" AGENTS = "agents" + MCP = "mcp" INSIGHT_MODULE_FILTERS = { @@ -676,6 +677,7 @@ class InsightModules(Enum): InsightModules.AGENTS: lambda spans: any( span.get("op").startswith("gen_ai.") for span in spans ), + InsightModules.MCP: lambda spans: any(span.get("op").startswith("mcp.") for span in spans), } StatsPeriod = namedtuple("StatsPeriod", ("segments", "interval")) diff --git a/src/sentry/event_manager.py b/src/sentry/event_manager.py index 76549e28876c35..23a4ce67622a03 100644 --- a/src/sentry/event_manager.py +++ b/src/sentry/event_manager.py @@ -2539,6 +2539,7 @@ def _detect_performance_problems(jobs: Sequence[Job], projects: ProjectsMapping) InsightModules.QUEUE: "has_insights_queues", InsightModules.LLM_MONITORING: "has_insights_llm_monitoring", InsightModules.AGENTS: "has_insights_agent_monitoring", + InsightModules.MCP: "has_insights_mcp", }