sentry explore --metric <name> --dataset metrics cannot resolve SDK v10 trace metrics because the --metric auto-resolver queries dataset=metrics (the legacy DDM/release-health surface backed by OrganizationReleaseHealthDataEndpoint). SDK v10 Sentry.metrics.count() emits trace_metric envelope items stored in dataset=tracemetrics, which is the dataset the Sentry Explore Metrics UI uses (DiscoverDatasets.TRACEMETRICS).
Evidence
The Sentry MCP server emits Sentry.metrics.count("app.oauth.skill_granted", ...) via @sentry/cloudflare@10.35.0 with enableMetrics: true. The metric has 21K+ data points over 30 days, confirmed via direct API:
dataset=tracemetrics → sum(value,app.oauth.skill_granted,counter,none) = 21,341 ✅
dataset=metrics → "could not be resolved" ❌
The CLI brute-forces MRI resolution against the events API with dataset=metrics, trying every (type, unit) combination. All return empty because the metric lives in tracemetrics.
Sentry source reference
The Explore Metrics UI uses DiscoverDatasets.TRACEMETRICS (static/app/views/explore/metrics/hooks/useMetricAggregatesTable.tsx) with field format sum(value, metricName, metricType, unit) against /organizations/{org}/events/.
Expected behavior
sentry explore --metric app.oauth.skill_granted --dataset metrics should resolve the metric from the tracemetrics dataset (or the --dataset metrics alias should route to tracemetrics).
Action taken on behalf of David Cramer.
sentry explore --metric <name> --dataset metricscannot resolve SDK v10 trace metrics because the--metricauto-resolver queriesdataset=metrics(the legacy DDM/release-health surface backed byOrganizationReleaseHealthDataEndpoint). SDK v10Sentry.metrics.count()emitstrace_metricenvelope items stored indataset=tracemetrics, which is the dataset the Sentry Explore Metrics UI uses (DiscoverDatasets.TRACEMETRICS).Evidence
The Sentry MCP server emits
Sentry.metrics.count("app.oauth.skill_granted", ...)via@sentry/cloudflare@10.35.0withenableMetrics: true. The metric has 21K+ data points over 30 days, confirmed via direct API:The CLI brute-forces MRI resolution against the events API with
dataset=metrics, trying every(type, unit)combination. All return empty because the metric lives intracemetrics.Sentry source reference
The Explore Metrics UI uses
DiscoverDatasets.TRACEMETRICS(static/app/views/explore/metrics/hooks/useMetricAggregatesTable.tsx) with field formatsum(value, metricName, metricType, unit)against/organizations/{org}/events/.Expected behavior
sentry explore --metric app.oauth.skill_granted --dataset metricsshould resolve the metric from thetracemetricsdataset (or the--dataset metricsalias should route totracemetrics).Action taken on behalf of David Cramer.