Skip to content

Commit

Permalink
fix(profiling) change chart title for continuous profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa committed Nov 7, 2024
1 parent e1e8aca commit ac679a8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion static/app/views/profiling/landing/profilesChartWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {PageFilters} from 'sentry/types/core';
import type {Series} from 'sentry/types/echarts';
import {axisLabelFormatter, tooltipFormatter} from 'sentry/utils/discover/charts';
import {useProfileEventsStats} from 'sentry/utils/profiling/hooks/useProfileEventsStats';
import useOrganization from 'sentry/utils/useOrganization';

import {
ContentContainer,
Expand Down Expand Up @@ -39,6 +40,7 @@ export function ProfilesChartWidget({
widgetHeight,
}: ProfilesChartWidgetProps) {
const theme = useTheme();
const organization = useOrganization();

const profileStats = useProfileEventsStats({
dataset: 'profiles',
Expand Down Expand Up @@ -116,7 +118,13 @@ export function ProfilesChartWidget({
return (
<WidgetContainer height={widgetHeight}>
<HeaderContainer>
{header ?? <HeaderTitleLegend>{t('Profiles by Percentiles')}</HeaderTitleLegend>}
{header ?? (
<HeaderTitleLegend>
{organization.features.includes('continuous-profiling-compat')
? t('Transactions by Percentiles')
: t('Profiles by Percentiles')}
</HeaderTitleLegend>
)}
</HeaderContainer>
<ContentContainer>
<ChartZoom {...selection?.datetime}>
Expand Down

0 comments on commit ac679a8

Please sign in to comment.