diff --git a/frontend/src/scenes/settings/SettingsMap.tsx b/frontend/src/scenes/settings/SettingsMap.tsx
index 3be4ecd4347c7..f5015ea7f5681 100644
--- a/frontend/src/scenes/settings/SettingsMap.tsx
+++ b/frontend/src/scenes/settings/SettingsMap.tsx
@@ -156,6 +156,7 @@ export const SettingsMap: SettingSection[] = [
id: 'replay-ingestion',
title: 'Ingestion controls',
component: ,
+ flag: 'SESSION_RECORDING_SAMPLING',
},
],
},
diff --git a/frontend/src/scenes/settings/settingsLogic.ts b/frontend/src/scenes/settings/settingsLogic.ts
index ae049e9dcf96e..665b7d27a4c7f 100644
--- a/frontend/src/scenes/settings/settingsLogic.ts
+++ b/frontend/src/scenes/settings/settingsLogic.ts
@@ -76,8 +76,8 @@ export const settingsLogic = kea([
},
],
settings: [
- (s) => [s.selectedLevel, s.selectedSectionId, s.sections],
- (selectedLevel, selectedSectionId, sections): Setting[] => {
+ (s) => [s.selectedLevel, s.selectedSectionId, s.sections, s.featureFlags],
+ (selectedLevel, selectedSectionId, sections, featureFlags): Setting[] => {
let settings: Setting[] = []
if (!selectedSectionId) {
@@ -88,7 +88,7 @@ export const settingsLogic = kea([
settings = sections.find((x) => x.id === selectedSectionId)?.settings || []
}
- return settings
+ return settings.filter((x) => (x.flag ? featureFlags[FEATURE_FLAGS[x.flag]] : true))
},
],
}),
diff --git a/frontend/src/scenes/settings/types.ts b/frontend/src/scenes/settings/types.ts
index 7ee3455fd79e7..30ee8324d0ebe 100644
--- a/frontend/src/scenes/settings/types.ts
+++ b/frontend/src/scenes/settings/types.ts
@@ -67,6 +67,7 @@ export type Setting = {
title: string
description?: JSX.Element | string
component: JSX.Element
+ flag?: keyof typeof FEATURE_FLAGS
}
export type SettingSection = {