Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(profiling): Clean up continuous profiling flags #76741

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ function ProfilingDurationRegressionIssueDetailsContent({
event,
project,
}: Required<EventDetailsContentProps>) {
const organization = useOrganization();
return (
<RegressionEventContainer>
<TransactionsDeltaProvider event={event} project={project}>
Expand All @@ -485,11 +484,9 @@ function ProfilingDurationRegressionIssueDetailsContent({
<ErrorBoundary mini>
<EventFunctionBreakpointChart event={event} />
</ErrorBoundary>
{!organization.features.includes('continuous-profiling-compat') && (
<ErrorBoundary mini>
<EventAffectedTransactions event={event} group={group} project={project} />
</ErrorBoundary>
)}
<ErrorBoundary mini>
<EventAffectedTransactions event={event} group={group} project={project} />
</ErrorBoundary>
<ErrorBoundary mini>
<InterimSection
type={SectionKey.REGRESSION_FLAMEGRAPH}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,16 +472,17 @@ function NodeActions(props: {
(typeof eventSize === 'number' ? ` (${formatBytesBase10(eventSize, 0)})` : ''),
};

const continuousProfileLink: MenuItemProps | null = profileLink
? {
key: 'continuous-profile',
onAction: () => {
traceAnalytics.trackViewContinuousProfile(props.organization);
browserHistory.push(profileLink!);
},
label: t('Continuous Profile'),
}
: null;
const continuousProfileLink: MenuItemProps | null =
organization.features.includes('continuous-profiling-ui') && !profileLink
? {
key: 'continuous-profile',
onAction: () => {
traceAnalytics.trackViewContinuousProfile(props.organization);
browserHistory.push(profileLink!);
},
label: t('Continuous Profile'),
}
: null;

if (isTransactionNode(props.node)) {
return [showInView, jsonDetails, continuousProfileLink].filter(TypeSafeBoolean);
Expand All @@ -503,7 +504,7 @@ function NodeActions(props: {
}

return [showInView];
}, [props, profileLink]);
}, [props, profileLink, organization.features]);

return (
<ActionsContainer>
Expand Down
12 changes: 4 additions & 8 deletions static/app/views/profiling/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -419,17 +419,13 @@ function ProfilingTransactionsContent(props: ProfilingTabContentProps) {
const cursor = decodeScalar(location.query.cursor);
const query = decodeScalar(location.query.query, '');

const continuousProfilingCompat = organization.features.includes(
'continuous-profiling-compat'
);

const transactions = useProfileEvents<FieldType>({
cursor,
fields,
query,
sort,
referrer: 'api.profiling.landing-table',
continuousProfilingCompat,
continuousProfilingCompat: true,
});

const transactionsError =
Expand Down Expand Up @@ -484,14 +480,14 @@ function ProfilingTransactionsContent(props: ProfilingTabContentProps) {
<ProfilingOnboardingCTA />
) : (
<Fragment>
{organization.features.includes('continuous-profiling-compat') ? (
{organization.features.includes('continuous-profiling-ui') ? (
<Fragment>
<ProfilesChartWidget
chartHeight={150}
referrer="api.profiling.landing-chart"
userQuery={query}
selection={selection}
continuousProfilingCompat={continuousProfilingCompat}
continuousProfilingCompat
/>
<SlowestFunctionsTable userQuery={query} />
</Fragment>
Expand All @@ -502,7 +498,7 @@ function ProfilingTransactionsContent(props: ProfilingTabContentProps) {
referrer="api.profiling.landing-chart"
userQuery={query}
selection={selection}
continuousProfilingCompat={continuousProfilingCompat}
continuousProfilingCompat
/>
<WidgetsContainer>
<LandingWidgetSelector
Expand Down
Loading