From c8f18b14182326d311f05274fe6070d220e3cbf8 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Sat, 27 Jun 2026 10:42:34 +0000 Subject: [PATCH 1/2] fix(incidents): Handle unaliased crash-free aggregates in charts --- src/sentry/incidents/charts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sentry/incidents/charts.py b/src/sentry/incidents/charts.py index cf7df6e442e2..0207605929fa 100644 --- a/src/sentry/incidents/charts.py +++ b/src/sentry/incidents/charts.py @@ -30,6 +30,8 @@ SESSION_AGGREGATE_TO_FIELD = { CRASH_FREE_SESSIONS: "sum(session)", CRASH_FREE_USERS: "count_unique(user)", + "percentage(sessions_crashed, sessions)": "sum(session)", + "percentage(users_crashed, users)": "count_unique(user)", } From 5b0daa84b638f7acfb6fce52813caca97b14318b Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Sun, 28 Jun 2026 19:47:34 +0000 Subject: [PATCH 2/2] fix(incidents): Handle unaliased crash-free aggregates in charts --- static/app/views/alerts/utils/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/static/app/views/alerts/utils/index.tsx b/static/app/views/alerts/utils/index.tsx index 8d2217990dea..95195492b864 100644 --- a/static/app/views/alerts/utils/index.tsx +++ b/static/app/views/alerts/utils/index.tsx @@ -110,12 +110,18 @@ export function getQueryDatasource( } export function isSessionAggregate(aggregate: string) { - return Object.values(SessionsAggregate).includes(aggregate as SessionsAggregate); + return ( + Object.values(SessionsAggregate).includes(aggregate as SessionsAggregate) || + aggregate === 'percentage(sessions_crashed, sessions)' || + aggregate === 'percentage(users_crashed, users)' + ); } export const SESSION_AGGREGATE_TO_FIELD: Record = { [SessionsAggregate.CRASH_FREE_SESSIONS]: SessionFieldWithOperation.SESSIONS, [SessionsAggregate.CRASH_FREE_USERS]: SessionFieldWithOperation.USERS, + 'percentage(sessions_crashed, sessions)': SessionFieldWithOperation.SESSIONS, + 'percentage(users_crashed, users)': SessionFieldWithOperation.USERS, }; export function alertAxisFormatter(value: number, seriesName: string, aggregate: string) {