Skip to content

Commit c39c403

Browse files
authored
feat(mcp-insights): set flag for mcp spans (#95226)
1 parent 8aa950e commit c39c403

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/sentry/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ class InsightModules(Enum):
640640
QUEUE = "queue"
641641
LLM_MONITORING = "llm_monitoring"
642642
AGENTS = "agents"
643+
MCP = "mcp"
643644

644645

645646
INSIGHT_MODULE_FILTERS = {
@@ -676,6 +677,7 @@ class InsightModules(Enum):
676677
InsightModules.AGENTS: lambda spans: any(
677678
span.get("op").startswith("gen_ai.") for span in spans
678679
),
680+
InsightModules.MCP: lambda spans: any(span.get("op").startswith("mcp.") for span in spans),
679681
}
680682

681683
StatsPeriod = namedtuple("StatsPeriod", ("segments", "interval"))

src/sentry/event_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,6 +2539,7 @@ def _detect_performance_problems(jobs: Sequence[Job], projects: ProjectsMapping)
25392539
InsightModules.QUEUE: "has_insights_queues",
25402540
InsightModules.LLM_MONITORING: "has_insights_llm_monitoring",
25412541
InsightModules.AGENTS: "has_insights_agent_monitoring",
2542+
InsightModules.MCP: "has_insights_mcp",
25422543
}
25432544

25442545

0 commit comments

Comments
 (0)