getsentry / getsentry/sentry-mcp

Support metricsEnhanced dataset for transaction performance metrics

Open
#787 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
853
Forks
144
Avg merge
19h 25m
Merged PRs (30d)
32

Description

## Problem
The `list_events` tool currently hardcodes dataset to only `["errors", "logs", "spans"]`:
https://github.com/getsentry/sentry-mcp/blob/main/packages/mcp-core/src/tools/list-events/index.ts#L67

However, on self-hosted Sentry instances with metrics-only configuration:
- The `spans` dataset returns empty (no event-level span storage)
- The Sentry UI uses `dataset=metricsEnhanced` to display transaction metrics
- The `metricsEnhanced` dataset works perfectly via direct API calls

## Impact
Users cannot access transaction performance data (p50, p75, p95, p99) through MCP, even though:
1. The data exists and is visible in the UI
2. The API endpoint supports it
3. The `list_events` tool already supports aggregate functions

## Proposed Solution
Add `"metricsEnhanced"` to the dataset enum in `list-events/index.ts`:

```typescript
dataset: z
.enum(["errors", "logs", "spans", "metricsEnhanced"])
.default("errors")

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.