Skip to content

Commit 3a4f39a

Browse files
committed
make labels align with the series names exposed in dashboards
1 parent c0f825f commit 3a4f39a

6 files changed

+25
-33
lines changed

static/app/views/insights/sessions/charts/errorFreeSessionsChart.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function ErrorFreeSessionsChart() {
77
const {series, isPending, error} = useErrorFreeSessions();
88

99
const aliases = {
10-
successful_session_rate: t('Error free session rate'),
10+
successful_session_rate: t('crash_free_rate(session)'),
1111
};
1212

1313
return (

static/app/views/insights/sessions/charts/sessionHealthCountChart.tsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
import ExternalLink from 'sentry/components/links/externalLink';
22
import {t, tct} from 'sentry/locale';
33
import {InsightsLineChartWidget} from 'sentry/views/insights/common/components/insightsLineChartWidget';
4-
import {FRONTEND_LANDING_SUB_PATH} from 'sentry/views/insights/pages/frontend/settings';
54
import useSessionHealthBreakdown from 'sentry/views/insights/sessions/queries/useSessionHealthBreakdown';
65

7-
export default function SessionHealthCountChart({view}: {view: string}) {
6+
export default function SessionHealthCountChart() {
87
const {series, isPending, error} = useSessionHealthBreakdown({type: 'count'});
9-
const frontendPath = view === FRONTEND_LANDING_SUB_PATH;
108

119
const aliases = {
12-
healthy_session_count: t('Healthy'),
13-
crashed_session_count: frontendPath ? t('Unhandled errors') : t('Crashed'),
14-
errored_session_count: frontendPath ? t('Handled errors') : t('Errored'),
15-
abnormal_session_count: t('Abnormal'),
10+
healthy_session_count: 'count_healthy(session)',
11+
crashed_session_count: 'count_crashed(session)',
12+
errored_session_count: 'count_errored(session)',
13+
abnormal_session_count: 'count_abnormal(session)',
1614
};
1715

1816
return (

static/app/views/insights/sessions/charts/sessionHealthRateChart.tsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
import ExternalLink from 'sentry/components/links/externalLink';
22
import {t, tct} from 'sentry/locale';
33
import {InsightsAreaChartWidget} from 'sentry/views/insights/common/components/insightsAreaChartWidget';
4-
import {FRONTEND_LANDING_SUB_PATH} from 'sentry/views/insights/pages/frontend/settings';
54
import useSessionHealthBreakdown from 'sentry/views/insights/sessions/queries/useSessionHealthBreakdown';
65

7-
export default function SessionHealthRateChart({view}: {view: string}) {
6+
export default function SessionHealthRateChart() {
87
const {series, isPending, error} = useSessionHealthBreakdown({type: 'rate'});
9-
const frontendPath = view === FRONTEND_LANDING_SUB_PATH;
108

119
const aliases = {
12-
healthy_session_rate: t('Healthy'),
13-
crashed_session_rate: frontendPath ? t('Unhandled errors') : t('Crashed'),
14-
errored_session_rate: frontendPath ? t('Handled errors') : t('Errored'),
15-
abnormal_session_rate: t('Abnormal'),
10+
healthy_session_rate: 'rate_healthy(session)',
11+
crashed_session_rate: 'rate_crashed(session)',
12+
errored_session_rate: 'rate_errored(session)',
13+
abnormal_session_rate: 'rate_abnormal(session)',
1614
};
1715

1816
return (

static/app/views/insights/sessions/charts/userHealthCountChart.tsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
import ExternalLink from 'sentry/components/links/externalLink';
22
import {t, tct} from 'sentry/locale';
33
import {InsightsLineChartWidget} from 'sentry/views/insights/common/components/insightsLineChartWidget';
4-
import {FRONTEND_LANDING_SUB_PATH} from 'sentry/views/insights/pages/frontend/settings';
54
import useUserHealthBreakdown from 'sentry/views/insights/sessions/queries/useUserHealthBreakdown';
65

7-
export default function UserHealthCountChart({view}: {view: string}) {
6+
export default function UserHealthCountChart() {
87
const {series, isPending, error} = useUserHealthBreakdown({type: 'count'});
9-
const frontendPath = view === FRONTEND_LANDING_SUB_PATH;
108

119
const aliases = {
12-
healthy_user_count: t('Healthy'),
13-
crashed_user_count: frontendPath ? t('Unhandled errors') : t('Crashed'),
14-
errored_user_count: frontendPath ? t('Handled errors') : t('Errored'),
15-
abnormal_user_count: t('Abnormal'),
10+
healthy_user_count: 'count_healthy(user)',
11+
crashed_user_count: 'count_crashed(user)',
12+
errored_user_count: 'count_errored(user)',
13+
abnormal_user_count: 'count_abnormal(user)',
1614
};
1715

1816
return (

static/app/views/insights/sessions/charts/userHealthRateChart.tsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
import ExternalLink from 'sentry/components/links/externalLink';
22
import {t, tct} from 'sentry/locale';
33
import {InsightsAreaChartWidget} from 'sentry/views/insights/common/components/insightsAreaChartWidget';
4-
import {FRONTEND_LANDING_SUB_PATH} from 'sentry/views/insights/pages/frontend/settings';
54
import useUserHealthBreakdown from 'sentry/views/insights/sessions/queries/useUserHealthBreakdown';
65

7-
export default function UserHealthRateChart({view}: {view: string}) {
6+
export default function UserHealthRateChart() {
87
const {series, isPending, error} = useUserHealthBreakdown({type: 'rate'});
9-
const frontendPath = view === FRONTEND_LANDING_SUB_PATH;
108

119
const aliases = {
12-
healthy_user_rate: t('Healthy'),
13-
crashed_user_rate: frontendPath ? t('Unhandled errors') : t('Crashed'),
14-
errored_user_rate: frontendPath ? t('Handled errors') : t('Errored'),
15-
abnormal_user_rate: t('Abnormal'),
10+
healthy_user_rate: 'rate_healthy(user)',
11+
crashed_user_rate: 'rate_crashed(user)',
12+
errored_user_rate: 'rate_errored(user)',
13+
abnormal_user_rate: 'rate_abnormal(user)',
1614
};
1715

1816
return (

static/app/views/insights/sessions/views/overview.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ export function SessionsOverview() {
5454
</ModuleLayout.Third>
5555
) : undefined}
5656
<ModuleLayout.Third>
57-
<SessionHealthCountChart view={view} />
57+
<SessionHealthCountChart />
5858
</ModuleLayout.Third>
5959
<ModuleLayout.Third>
60-
<UserHealthCountChart view={view} />
60+
<UserHealthCountChart />
6161
</ModuleLayout.Third>
6262
<ModuleLayout.Third />
6363
<ModuleLayout.Third>
64-
<SessionHealthRateChart view={view} />
64+
<SessionHealthRateChart />
6565
</ModuleLayout.Third>
6666
<ModuleLayout.Third>
67-
<UserHealthRateChart view={view} />
67+
<UserHealthRateChart />
6868
</ModuleLayout.Third>
6969
</Fragment>
7070
);

0 commit comments

Comments
 (0)