Skip to content

Commit 9293cdf

Browse files
authored
ref(mcp-insights): Split into tabs (#103149)
1 parent 4b0110c commit 9293cdf

File tree

59 files changed

+1029
-397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1029
-397
lines changed

static/app/router/routes.tsx

Lines changed: 59 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {MODULE_BASE_URLS} from 'sentry/views/insights/common/utils/useModuleURL'
2222
import {AGENTS_LANDING_SUB_PATH} from 'sentry/views/insights/pages/agents/settings';
2323
import {BACKEND_LANDING_SUB_PATH} from 'sentry/views/insights/pages/backend/settings';
2424
import {FRONTEND_LANDING_SUB_PATH} from 'sentry/views/insights/pages/frontend/settings';
25+
import {MCP_LANDING_SUB_PATH} from 'sentry/views/insights/pages/mcp/settings';
2526
import {MOBILE_LANDING_SUB_PATH} from 'sentry/views/insights/pages/mobile/settings';
2627
import {DOMAIN_VIEW_BASE_URL} from 'sentry/views/insights/pages/settings';
2728
import {getModuleView} from 'sentry/views/insights/pages/utils';
@@ -2069,6 +2070,64 @@ function buildRoutes(): RouteObject[] {
20692070
...moduleRoutes,
20702071
],
20712072
},
2073+
// Redirect old links to the new mcp landing page
2074+
{
2075+
path: `ai/mcp/`,
2076+
redirectTo: `/${DOMAIN_VIEW_BASE_URL}/${MCP_LANDING_SUB_PATH}/`,
2077+
},
2078+
{
2079+
path: `${MCP_LANDING_SUB_PATH}/`,
2080+
component: make(() => import('sentry/views/insights/pages/mcp/layout')),
2081+
children: [
2082+
{
2083+
index: true,
2084+
handle: {module: undefined},
2085+
component: make(() => import('sentry/views/insights/pages/mcp/overview')),
2086+
},
2087+
transactionSummaryRoute,
2088+
traceView,
2089+
{
2090+
path: `${MODULE_BASE_URLS[ModuleName.MCP_TOOLS]}/`,
2091+
children: [
2092+
{
2093+
index: true,
2094+
handle: {module: ModuleName.MCP_TOOLS},
2095+
component: make(
2096+
() => import('sentry/views/insights/mcp-tools/views/mcpToolsLandingPage')
2097+
),
2098+
},
2099+
],
2100+
},
2101+
{
2102+
path: `${MODULE_BASE_URLS[ModuleName.MCP_RESOURCES]}/`,
2103+
children: [
2104+
{
2105+
index: true,
2106+
handle: {module: ModuleName.MCP_RESOURCES},
2107+
component: make(
2108+
() =>
2109+
import(
2110+
'sentry/views/insights/mcp-resources/views/mcpResourcesLandingPage'
2111+
)
2112+
),
2113+
},
2114+
],
2115+
},
2116+
{
2117+
path: `${MODULE_BASE_URLS[ModuleName.MCP_PROMPTS]}/`,
2118+
children: [
2119+
{
2120+
index: true,
2121+
handle: {module: ModuleName.MCP_PROMPTS},
2122+
component: make(
2123+
() =>
2124+
import('sentry/views/insights/mcp-prompts/views/mcpPromptsLandingPage')
2125+
),
2126+
},
2127+
],
2128+
},
2129+
],
2130+
},
20722131
// Redirect old links to the new agents landing page
20732132
{
20742133
path: `ai/*`,
@@ -2109,16 +2168,6 @@ function buildRoutes(): RouteObject[] {
21092168
},
21102169
],
21112170
},
2112-
{
2113-
path: `${MODULE_BASE_URLS[ModuleName.MCP]}/`,
2114-
children: [
2115-
{
2116-
index: true,
2117-
handle: {module: ModuleName.MCP},
2118-
component: make(() => import('sentry/views/insights/mcp/views/overview')),
2119-
},
2120-
],
2121-
},
21222171
{
21232172
path: `${MODULE_BASE_URLS[ModuleName.AI_GENERATIONS]}/`,
21242173
children: [

static/app/utils/analytics/insightAnalyticEvents.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export type InsightEventParameters = {
3131
'insight.page_loads.cache': {has_ever_sent_data: boolean; view: DomainView};
3232
'insight.page_loads.db': {has_ever_sent_data: boolean; view: DomainView};
3333
'insight.page_loads.http': {has_ever_sent_data: boolean; view: DomainView};
34+
'insight.page_loads.mcp_prompts': {has_ever_sent_data: boolean; view: DomainView};
35+
'insight.page_loads.mcp_resources': {has_ever_sent_data: boolean; view: DomainView};
36+
'insight.page_loads.mcp_tools': {has_ever_sent_data: boolean; view: DomainView};
3437
'insight.page_loads.queue': {has_ever_sent_data: boolean; view: DomainView};
3538
'insight.page_loads.screen_load': {has_ever_sent_data: boolean; view: DomainView};
3639
'insight.page_loads.screen_rendering': {has_ever_sent_data: boolean; view: DomainView};
@@ -61,6 +64,9 @@ export const insightEventMap: Record<InsightEventKey, string | null> = {
6164
'insight.page_loads.ai': 'Insights: AI Page Load',
6265
'insight.page_loads.agent_models': 'Insights: Agent Models Page Load',
6366
'insight.page_loads.agent_tools': 'Insights: Agent Tools Page Load',
67+
'insight.page_loads.mcp_prompts': 'Insights: MCP Prompts Page Load',
68+
'insight.page_loads.mcp_resources': 'Insights: MCP Resources Page Load',
69+
'insight.page_loads.mcp_tools': 'Insights: MCP Tools Page Load',
6470
'insight.page_loads.app_start': 'Insights: App Start Page Load',
6571
'insight.page_loads.assets': 'Insights: Assets Page Load',
6672
'insight.page_loads.cache': 'Insights: Cache Page Load',

static/app/views/insights/agentModels/views/modelsLandingPage.tsx

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
66
import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
77
import {EAPSpanSearchQueryBuilder} from 'sentry/components/performance/spanSearchQueryBuilder';
88
import {SearchQueryBuilderProvider} from 'sentry/components/searchQueryBuilder/context';
9-
import {getSelectedProjectList} from 'sentry/utils/project/useSelectedProjectsHaveField';
109
import useOrganization from 'sentry/utils/useOrganization';
11-
import usePageFilters from 'sentry/utils/usePageFilters';
12-
import useProjects from 'sentry/utils/useProjects';
1310
import {TraceItemAttributeProvider} from 'sentry/views/explore/contexts/traceItemAttributeContext';
1411
import {TraceItemDataset} from 'sentry/views/explore/types';
1512
import {limitMaxPickableDays} from 'sentry/views/explore/utils';
@@ -26,24 +23,14 @@ import {WidgetGrid} from 'sentry/views/insights/pages/agents/components/styles';
2623
import TokenTypesWidget from 'sentry/views/insights/pages/agents/components/tokenTypesWidget';
2724
import TokenUsageWidget from 'sentry/views/insights/pages/agents/components/tokenUsageWidget';
2825
import {useAgentSpanSearchProps} from 'sentry/views/insights/pages/agents/hooks/useAgentSpanSearchProps';
26+
import {useShowAgentOnboarding} from 'sentry/views/insights/pages/agents/hooks/useShowAgentOnboarding';
2927
import {Onboarding} from 'sentry/views/insights/pages/agents/onboarding';
3028
import {TableUrlParams} from 'sentry/views/insights/pages/agents/utils/urlParams';
3129
import {ModuleName} from 'sentry/views/insights/types';
3230

33-
function useShowOnboarding() {
34-
const {projects} = useProjects();
35-
const pageFilters = usePageFilters();
36-
const selectedProjects = getSelectedProjectList(
37-
pageFilters.selection.projects,
38-
projects
39-
);
40-
41-
return !selectedProjects.some(p => p.hasInsightsAgentMonitoring);
42-
}
43-
44-
function AgentsOverviewPage() {
31+
function AgentModelsLandingPage() {
4532
const organization = useOrganization();
46-
const showOnboarding = useShowOnboarding();
33+
const showOnboarding = useShowAgentOnboarding();
4734
const datePageFilterProps = limitMaxPickableDays(organization);
4835
useDefaultToAllProjects();
4936

@@ -112,7 +99,7 @@ function PageWithProviders() {
11299
analyticEventName="insight.page_loads.agent_models"
113100
>
114101
<TraceItemAttributeProvider traceItemType={TraceItemDataset.SPANS} enabled>
115-
<AgentsOverviewPage />
102+
<AgentModelsLandingPage />
116103
</TraceItemAttributeProvider>
117104
</ModulePageProviders>
118105
);

static/app/views/insights/agentTools/views/toolsLandingPage.tsx

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
66
import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
77
import {EAPSpanSearchQueryBuilder} from 'sentry/components/performance/spanSearchQueryBuilder';
88
import {SearchQueryBuilderProvider} from 'sentry/components/searchQueryBuilder/context';
9-
import {getSelectedProjectList} from 'sentry/utils/project/useSelectedProjectsHaveField';
109
import useOrganization from 'sentry/utils/useOrganization';
11-
import usePageFilters from 'sentry/utils/usePageFilters';
12-
import useProjects from 'sentry/utils/useProjects';
1310
import {TraceItemAttributeProvider} from 'sentry/views/explore/contexts/traceItemAttributeContext';
1411
import {TraceItemDataset} from 'sentry/views/explore/types';
1512
import {limitMaxPickableDays} from 'sentry/views/explore/utils';
@@ -25,24 +22,14 @@ import ToolUsageWidget from 'sentry/views/insights/pages/agents/components/toolC
2522
import ToolErrorsWidget from 'sentry/views/insights/pages/agents/components/toolErrorsWidget';
2623
import {ToolsTable} from 'sentry/views/insights/pages/agents/components/toolsTable';
2724
import {useAgentSpanSearchProps} from 'sentry/views/insights/pages/agents/hooks/useAgentSpanSearchProps';
25+
import {useShowAgentOnboarding} from 'sentry/views/insights/pages/agents/hooks/useShowAgentOnboarding';
2826
import {Onboarding} from 'sentry/views/insights/pages/agents/onboarding';
2927
import {TableUrlParams} from 'sentry/views/insights/pages/agents/utils/urlParams';
3028
import {ModuleName} from 'sentry/views/insights/types';
3129

32-
function useShowOnboarding() {
33-
const {projects} = useProjects();
34-
const pageFilters = usePageFilters();
35-
const selectedProjects = getSelectedProjectList(
36-
pageFilters.selection.projects,
37-
projects
38-
);
39-
40-
return !selectedProjects.some(p => p.hasInsightsAgentMonitoring);
41-
}
42-
43-
function AgentsOverviewPage() {
30+
function AgentToolsLandingPage() {
4431
const organization = useOrganization();
45-
const showOnboarding = useShowOnboarding();
32+
const showOnboarding = useShowAgentOnboarding();
4633
const datePageFilterProps = limitMaxPickableDays(organization);
4734
useDefaultToAllProjects();
4835

@@ -108,7 +95,7 @@ function PageWithProviders() {
10895
analyticEventName="insight.page_loads.agent_tools"
10996
>
11097
<TraceItemAttributeProvider traceItemType={TraceItemDataset.SPANS} enabled>
111-
<AgentsOverviewPage />
98+
<AgentToolsLandingPage />
11299
</TraceItemAttributeProvider>
113100
</ModulePageProviders>
114101
);

static/app/views/insights/common/components/modulesOnboarding.tsx

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -294,18 +294,26 @@ const EMPTY_STATE_CONTENT: Record<TitleableModuleNames, EmptyStateContent> = {
294294
valuePropPoints: [],
295295
imageSrc: screenLoadsPreviewImg,
296296
},
297-
mcp: {
298-
heading: t('Model Context Providers'),
299-
description: t(
300-
'Monitor your MCP servers to ensure your AI applications have reliable access to tools, resources, and data sources they depend on.'
301-
),
297+
'mcp-tools': {
298+
heading: t('TODO'),
299+
description: t('TODO'),
300+
valuePropDescription: t('TODO'),
301+
valuePropPoints: [],
302+
imageSrc: screenLoadsPreviewImg,
303+
},
304+
'mcp-resources': {
305+
heading: t('TODO'),
306+
description: t('TODO'),
307+
valuePropDescription: t('TODO'),
308+
valuePropPoints: [],
309+
imageSrc: screenLoadsPreviewImg,
310+
},
311+
'mcp-prompts': {
312+
heading: t('TODO'),
313+
description: t('TODO'),
314+
valuePropDescription: t('TODO'),
315+
valuePropPoints: [],
302316
imageSrc: screenLoadsPreviewImg,
303-
valuePropDescription: t('MCP monitoring gives you visibility into:'),
304-
valuePropPoints: [
305-
t('Tool execution success rates and failure patterns.'),
306-
t('Resource access performance and availability.'),
307-
t('Usage patterns across different tools and prompts.'),
308-
],
309317
},
310318
'ai-generations': {
311319
heading: t('AI Generations'),

static/app/views/insights/common/components/widgets/mcpTrafficWidget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {t} from 'sentry/locale';
22
import type {LoadableChartWidgetProps} from 'sentry/views/insights/common/components/widgets/types';
3-
import {MCPReferrer} from 'sentry/views/insights/mcp/utils/referrer';
43
import {useCombinedQuery} from 'sentry/views/insights/pages/agents/hooks/useCombinedQuery';
4+
import {MCPReferrer} from 'sentry/views/insights/pages/mcp/utils/referrer';
55
import {BaseTrafficWidget} from 'sentry/views/insights/pages/platform/shared/baseTrafficWidget';
66

77
export default function McpTrafficWidget(props: LoadableChartWidgetProps) {

static/app/views/insights/common/queries/useHasFirstSpan.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ const modulePropertyMap: Record<
2626
[ModuleName.AGENT_TOOLS]: 'hasInsightsAgentMonitoring',
2727
[ModuleName.AI_GENERATIONS]: 'hasInsightsAgentMonitoring',
2828
[ModuleName.APP_START]: 'hasInsightsAppStart',
29-
[ModuleName.MCP]: 'hasInsightsMCP',
29+
[ModuleName.MCP_TOOLS]: 'hasInsightsMCP',
30+
[ModuleName.MCP_RESOURCES]: 'hasInsightsMCP',
31+
[ModuleName.MCP_PROMPTS]: 'hasInsightsMCP',
3032
// Renamed resource to assets
3133
[ModuleName.RESOURCE]: 'hasInsightsAssets',
3234
[ModuleName.SCREEN_RENDERING]: 'hasInsightsScreenLoad', // Screen rendering and screen loads share similar spans

static/app/views/insights/common/utils/moduleTitles.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const DOMAIN_VIEW_MODULE_TITLES: Record<
1414
Partial<Record<ModuleName, string>>
1515
> = {
1616
'ai-agents': {},
17+
mcp: {},
1718
backend: {},
1819
mobile: {
1920
[ModuleName.HTTP]: HTTP_MOBILE_MODULE_TITLE,

static/app/views/insights/common/utils/useModuleURL.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import {BASE_URL as VITALS_BASE_URL} from 'sentry/views/insights/browser/webVita
88
import {BASE_URL as CACHE_BASE_URL} from 'sentry/views/insights/cache/settings';
99
import {BASE_URL as DB_BASE_URL} from 'sentry/views/insights/database/settings';
1010
import {BASE_URL as HTTP_BASE_URL} from 'sentry/views/insights/http/settings';
11-
import {BASE_URL as MCP_BASE_URL} from 'sentry/views/insights/mcp/settings';
11+
import {BASE_URL as MCP_PROMPTS_BASE_URL} from 'sentry/views/insights/mcp-prompts/settings';
12+
import {BASE_URL as MCP_RESOURCES_BASE_URL} from 'sentry/views/insights/mcp-resources/settings';
13+
import {BASE_URL as MCP_TOOLS_BASE_URL} from 'sentry/views/insights/mcp-tools/settings';
1214
import {BASE_URL as APP_STARTS_BASE_URL} from 'sentry/views/insights/mobile/appStarts/settings';
1315
import {BASE_URL as SCREEN_LOADS_BASE_URL} from 'sentry/views/insights/mobile/screenload/settings';
1416
import {BASE_URL as SCREEN_RENDERING_BASE_URL} from 'sentry/views/insights/mobile/screenRendering/settings';
@@ -35,7 +37,9 @@ export const MODULE_BASE_URLS: Record<ModuleName, string> = {
3537
[ModuleName.RESOURCE]: RESOURCES_BASE_URL,
3638
[ModuleName.AGENT_MODELS]: AGENT_MODELS_BASE_URL,
3739
[ModuleName.AGENT_TOOLS]: AGENT_TOOLS_BASE_URL,
38-
[ModuleName.MCP]: MCP_BASE_URL,
40+
[ModuleName.MCP_TOOLS]: MCP_TOOLS_BASE_URL,
41+
[ModuleName.MCP_RESOURCES]: MCP_RESOURCES_BASE_URL,
42+
[ModuleName.MCP_PROMPTS]: MCP_PROMPTS_BASE_URL,
3943
[ModuleName.AI_GENERATIONS]: AI_GENERATIONS_BASE_URL,
4044
[ModuleName.MOBILE_UI]: MOBILE_UI_BASE_URL,
4145
[ModuleName.MOBILE_VITALS]: MOBILE_SCREENS_BASE_URL,

static/app/views/insights/common/views/spans/selectors/actionSelector.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ const LABEL_FOR_MODULE_NAME: Record<ModuleName, ReactNode> = {
131131
'screen-rendering': t('Action'),
132132
'agent-models': t('Action'),
133133
'agent-tools': t('Action'),
134-
mcp: t('Action'),
134+
'mcp-tools': t('Action'),
135+
'mcp-resources': t('Action'),
136+
'mcp-prompts': t('Action'),
135137
'ai-generations': t('Action'),
136138
sessions: t('Action'),
137139
};

0 commit comments

Comments
 (0)