You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Metric issue tool output omits alert rule details (query, aggregate, condition, evaluated value), leaving the agent without the context it needs to help root-cause an alert.
The Sentry UI surfaces this clearly (see example: dataset, aggregate count(), query process_shard OR OutboxFlushError, interval, threshold, evaluated value), but none of it is included in the MCP tool response for metric_issue type issues.
Impact: agent responses are effectively useless for metric alerts — no query context means no ability to investigate signal vs. noise, trend, or root cause
The event output currently includes only generic tags (level, interface_type) and trace info, with no alert rule payload
Reopened: #1129 only partly fixed this. Real metric issue output still shows only the evaluated value and threshold. Dataset, aggregate, query, interval and monitor ID are missing.
Likely cause:formatMetricAlertDetails reads snake_case keys (data_sources, query_obj, snuba_query), but the event API returns camelCase (dataSources, queryObj, snubaQuery). The tests used snake_case fixtures, and detectorId isn't shown.
Fix: read the camelCase keys, show detectorId so agents can call get_metric_monitor_details, and add a test using a real event.
Also: in Response Notes, give the agent a ready-to-run call for the alert's dataset (search_logs, search_traces, search_errors or search_metrics). Pre-fill it with the alert's query, environment and the time of the breach, and drop the stacktrace and trace hints.
Activity
linear-code commentedon Jun 12, 2026
MCP-982
fix(formatting): include metric alert rule details in issue output (g…
Dhrumil-Sentry commentedon Oct 29, 2026
Reopened: #1129 only partly fixed this. Real metric issue output still shows only the evaluated value and threshold. Dataset, aggregate, query, interval and monitor ID are missing.
Likely cause:
formatMetricAlertDetailsreads snake_case keys (data_sources,query_obj,snuba_query), but the event API returns camelCase (dataSources,queryObj,snubaQuery). The tests used snake_case fixtures, anddetectorIdisn't shown.Fix: read the camelCase keys, show
detectorIdso agents can callget_metric_monitor_details, and add a test using a real event.Also: in Response Notes, give the agent a ready-to-run call for the alert's dataset (
search_logs,search_traces,search_errorsorsearch_metrics). Pre-fill it with the alert's query, environment and the time of the breach, and drop the stacktrace and trace hints.fix(formatting): read camelCase metric alert evidence and link to bre…
feat(api): Type metric issue occurrence evidenceData in the API schema (
fix(formatting): read camelCase metric alert evidence and link to bre…