Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(logs): remove fully rolled-out logs-group-by flag (#82659)

Frank Hamand1ceb882b525b
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index de3ac83c79b5..be4651c6987a 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -363,7 +363,6 @@ export const FEATURE_FLAGS = {
LOGS: 'logs', // owner: #team-logs
LOGS_ALERTING: 'logs-alerting', // owner: #team-logs
LOGS_ANOMALIES: 'logs-anomalies', // owner: @jonmcwest #team-logs
- LOGS_GROUP_BY: 'logs-group-by', // owner: #team-logs
LOGS_IN_ERROR_TRACKING: 'logs-in-error-tracking', // owner: @jonmcwest #team-logs
LOGS_METRIC_RULES: 'logs-metric-rules', // owner: #team-logs
LOGS_PATTERNS_VIEW: 'logs-patterns-view', // owner: #team-logs
diff --git a/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsx b/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsx
index f1101ad5a0a2..9732632314a9 100644
--- a/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsx
+++ b/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsx
@@ -44,18 +44,18 @@ export const LogsDisplayBar = ({
const { facetRailCollapsed, viewMode } = useValues(logsViewerConfigLogic)
const { setFacetRailCollapsed, setViewMode } = useActions(logsViewerConfigLogic)
const showPatternsView = useFeatureFlag('LOGS_PATTERNS_VIEW')
- const showGroupBy = useFeatureFlag('LOGS_GROUP_BY')
const inPatternsMode = showPatternsView && viewMode === 'patterns'
// Group is a third view like Patterns: the mode lives in the segmented bar; the key
- // picker below is the mode's configuration. Double-gated so it's unreachable flag-off.
- const inGroupByMode = showGroupBy && viewMode === 'group'
+ // picker below is the mode's configuration.
+ const inGroupByMode = viewMode === 'group'
- // Each lens joins the bar behind its own flag; the bar renders once any non-Logs lens exists.
+ // Patterns joins the bar behind its flag; Group is always available. The bar renders once
+ // any non-Logs lens exists.
const viewModeOptions = [
{ value: 'logs' as const, label: 'Logs' },
...(showPatternsView ? [{ value: 'patterns' as const, label: 'Patterns' }] : []),
- ...(showGroupBy ? [{ value: 'group' as const, label: 'Group' }] : []),
+ { value: 'group' as const, label: 'Group' },
]
return (
diff --git a/products/logs/frontend/components/LogsViewer/LogsViewer.tsx b/products/logs/frontend/components/LogsViewer/LogsViewer.tsx
index 1ea5aecd6488..91e37a324d66 100644
--- a/products/logs/frontend/components/LogsViewer/LogsViewer.tsx
+++ b/products/logs/frontend/components/LogsViewer/LogsViewer.tsx
@@ -128,7 +128,6 @@ function LogsViewerContent({
const { runQuery, fetchNextLogsPage } = useActions(logsViewerDataLogic)
const { setDateRange, zoomDateRange } = useActions(logsViewerFiltersLogic)
const showPatternsView = useFeatureFlag('LOGS_PATTERNS_VIEW')
- const showGroupBy = useFeatureFlag('LOGS_GROUP_BY')
const { cellScrollLefts } = useValues(virtualizedLogsListLogic({ id }))
const { setCellScrollLeft } = useActions(virtualizedLogsListLogic({ id }))
const messageScrollLeft = cellScrollLefts['message'] ?? 0
@@ -357,7 +356,7 @@ function LogsViewerContent({
// logsViewerFiltersLogic). Each gates on its flag too, so its query stays unreachable when
// the flag is off regardless of the (non-persisted) viewMode state.
const inPatternsMode = showPatternsView && viewMode === 'patterns'
- const inGroupByMode = showGroupBy && viewMode === 'group'
+ const inGroupByMode = viewMode === 'group'
const resultsRegion = inPatternsMode ? (
<LogsPatterns id={id} />
) : inGroupByMode ? (
diff --git a/products/logs/frontend/components/LogsViewer/config/logsViewerConfigLogic.ts b/products/logs/frontend/components/LogsViewer/config/logsViewerConfigLogic.ts
index f4ac84ec2e54..588059be8fbf 100644
--- a/products/logs/frontend/components/LogsViewer/config/logsViewerConfigLogic.ts
+++ b/products/logs/frontend/components/LogsViewer/config/logsViewerConfigLogic.ts
@@ -277,8 +277,8 @@ export const logsViewerConfigLogic = kea<logsViewerConfigLogicType>([
},
},
],
- // The Group view's configuration: the ordered dimensions to group by (behind the
- // logs-group-by flag). Kept separate from viewMode so the choice survives switching
+ // The Group view's configuration: the ordered dimensions to group by. Kept separate
+ // from viewMode so the choice survives switching
// lenses within a visit — Logs and back returns to the same grouping. Empty = no key
// chosen yet (empty state). Not persisted across visits — grouping is an explicit,
// per-visit exploration like Patterns.