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-patterns-view flag (#82662)

Frank Hamand8faf82e93954
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index 88ec01db6298..3821efeb299a 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -365,7 +365,6 @@ export const FEATURE_FLAGS = {
LOGS_ANOMALIES: 'logs-anomalies', // owner: @jonmcwest #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
LOGS_SAVED_VIEWS: 'logs-saved-views', // owner: #team-logs
LOGS_SERVICES_VIEW: 'logs-services-view', // owner: #team-logs
LOGS_SERVICES_VIEW_V2: 'logs-services-view-v2', // owner: #team-logs
diff --git a/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsx b/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsx
index 9732632314a9..a5e7e1ecd0ec 100644
--- a/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsx
+++ b/products/logs/frontend/components/LogsViewer/LogsDisplayBar.tsx
@@ -6,7 +6,6 @@ import { LemonButton, LemonSegmentedButton, LemonSelect, LemonSwitch } from '@po
import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types'
import { TaxonomicStringPopover } from 'lib/components/TaxonomicPopover/TaxonomicPopover'
-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
import { humanFriendlyNumber } from 'lib/utils/numbers'
import { logsGroupByLogic } from 'products/logs/frontend/components/LogsGroupBy/logsGroupByLogic'
@@ -43,18 +42,16 @@ export const LogsDisplayBar = ({
}: LogsDisplayBarProps): JSX.Element => {
const { facetRailCollapsed, viewMode } = useValues(logsViewerConfigLogic)
const { setFacetRailCollapsed, setViewMode } = useActions(logsViewerConfigLogic)
- const showPatternsView = useFeatureFlag('LOGS_PATTERNS_VIEW')
- const inPatternsMode = showPatternsView && viewMode === 'patterns'
+ const inPatternsMode = 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.
const inGroupByMode = viewMode === 'group'
- // Patterns joins the bar behind its flag; Group is always available. The bar renders once
- // any non-Logs lens exists.
+ // The bar renders once any non-Logs lens exists.
const viewModeOptions = [
{ value: 'logs' as const, label: 'Logs' },
- ...(showPatternsView ? [{ value: 'patterns' as const, label: 'Patterns' }] : []),
+ { value: 'patterns' as const, label: 'Patterns' },
{ value: 'group' as const, label: 'Group' },
]
diff --git a/products/logs/frontend/components/LogsViewer/LogsViewer.tsx b/products/logs/frontend/components/LogsViewer/LogsViewer.tsx
index 91e37a324d66..51e9b88c7301 100644
--- a/products/logs/frontend/components/LogsViewer/LogsViewer.tsx
+++ b/products/logs/frontend/components/LogsViewer/LogsViewer.tsx
@@ -2,7 +2,6 @@ import { BindLogic, useActions, useValues } from 'kea'
import { useCallback, useEffect, useRef } from 'react'
import { TZLabelProps } from 'lib/components/TZLabel'
-import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
import { useKeyboardHotkeys } from 'lib/hooks/useKeyboardHotkeys'
import { SceneDivider } from '~/layout/scenes/components/SceneDivider'
@@ -127,7 +126,6 @@ function LogsViewerContent({
} = useValues(logsViewerDataLogic)
const { runQuery, fetchNextLogsPage } = useActions(logsViewerDataLogic)
const { setDateRange, zoomDateRange } = useActions(logsViewerFiltersLogic)
- const showPatternsView = useFeatureFlag('LOGS_PATTERNS_VIEW')
const { cellScrollLefts } = useValues(virtualizedLogsListLogic({ id }))
const { setCellScrollLeft } = useActions(virtualizedLogsListLogic({ id }))
const messageScrollLeft = cellScrollLefts['message'] ?? 0
@@ -353,9 +351,9 @@ function LogsViewerContent({
// Patterns and Group are modes of the Viewer, not separate tabs: they swap only the results
// region and reuse the same filter bar / FacetRail / date range (shared via
- // 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'
+ // logsViewerFiltersLogic). Each is reachable only in its viewMode, so its query stays down
+ // otherwise.
+ const inPatternsMode = viewMode === 'patterns'
const inGroupByMode = viewMode === 'group'
const resultsRegion = inPatternsMode ? (
<LogsPatterns id={id} />
diff --git a/products/logs/mcp/tools.yaml b/products/logs/mcp/tools.yaml
index babf9b5c6b23..5f209dd8d6ab 100644
--- a/products/logs/mcp/tools.yaml
+++ b/products/logs/mcp/tools.yaml
@@ -428,7 +428,6 @@ tools:
idempotent: true
title: Mine log patterns
description_file: ./prompts/logs-patterns.md
- feature_flag: logs-patterns-view
response:
exclude:
- patterns.*.examples
@@ -447,7 +446,6 @@ tools:
idempotent: true
title: Diff log patterns between two windows
description_file: ./prompts/logs-patterns-diff.md
- feature_flag: logs-patterns-view
response:
exclude:
- entries.*.pattern.examples
diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.json
index fd3d9e21ee11..ce2b7159bfd8 100644
--- a/services/mcp/schema/generated-tool-definitions.json
+++ b/services/mcp/schema/generated-tool-definitions.json
@@ -6452,8 +6452,7 @@
"idempotentHint": true,
"openWorldHint": true,
"readOnlyHint": true
- },
- "feature_flag": "logs-patterns-view"
+ }
},
"logs-patterns-diff": {
"description": "Compare the log patterns of two time windows and return what changed: templates that are **new**, templates whose rate **shifted** (with magnitude, e.g. 4x), and templates that are **gone**. This is the single most useful call for incident triage — \"what is different about now vs. before it broke\" in one round trip, instead of mining two windows yourself and hand-matching templates.\n\nAll parameters must be nested inside a `query` object, with an optional sibling `baselineDateRange`.\n\n# When to use\n\n- **Incident triage (the primary loop):** set `query.dateRange` to the incident window. Omit `baselineDateRange` (defaults to the same window one week earlier) or set it to a known-good window just before the incident. The `new` and biggest `rate_shift` entries are your suspects; pivot to their raw lines with `query-logs`.\n- **Explain a spike:** when a count or sparkline shows a spike (e.g. from `logs-count-ranges`), set `query.dateRange` to the spike window and `baselineDateRange` to the window just before it — the top `new` and `rate_shift` entries are the explanation. This is one call; do not mine the two windows separately and diff them yourself.\n- **Post-deploy check:** current window = since the deploy; `baselineDateRange` = the same-length window just before it. New error-severity templates right after a deploy are the classic regression signature.\n- **\"What changed this week?\"** — current = `-1d`, baseline auto. Good periodic sweep for a service you own.\n\n## Pick the right tool\n\n- Just summarize one window's content → `logs-patterns`.\n- Explain a _count_ change without needing message content → `logs-count-ranges` (cheaper).\n- Use **this** tool when you need to know _which messages_ are new or behaving differently between two periods.\n\n# Reading the response\n\nEntries come sorted most-interesting-first: `new` (by volume), then `rate_shift` (by magnitude), then `gone`, then `unchanged`.\n\n- `classification` — trust the labels; the thresholds already handle sampling honesty:\n - `new` requires clearing a novelty floor (~1% volume share, or any error/fatal lines). Below the floor, absence from the baseline sample is not evidence of novelty.\n - `rate_shift` requires ≥2x change in per-second rate (windows of different lengths are normalized) _and_ enough raw samples on both sides.\n - `unchanged` means \"no confident claim\", not \"provably identical\".\n- `rate_ratio` — current rate / baseline rate. 4.0 = 4x faster now, 0.25 = quartered.\n- `pattern` — full pattern stats including `match_regex` / `match_literal`, so you can pivot straight to the matching lines (same recipe as `logs-patterns`: message regex filter + the pattern's services/severities).\n- **Check `baseline.total_count` before trusting a wall of `new` entries** — an empty or tiny baseline (logging only started recently, service didn't exist last week) makes everything look new.\n- Both windows are mined from samples (`sampled: true`), so counts are estimates and templates rarer than ~1 in 10,000 rows may be invisible in either window.\n\nTemplate identity across the two windows is fingerprint-based (literal content), so the miner rendering `User <*> not found` in one window and `User <num> not found` in the other still compares as one pattern rather than a false new+gone pair.\n\n# Parameters\n\n## query.dateRange\n\nThe current (foreground) window — the period you are investigating. Same format as `logs-patterns`.\n\n## baselineDateRange\n\nOptional, sibling of `query` (not inside it). The comparison window. Omit for the default: the current window shifted back exactly one week, which absorbs daily/weekly volume cycles. Provide explicitly to compare against a pre-deploy or pre-incident period. It does not need to be the same length as the current window — rates are normalized per second.\n\n## query.severityLevels / query.serviceNames / query.searchTerm / query.filterGroup\n\nSame as `logs-patterns`; applied to **both** windows. Scoping by service is recommended — it prunes both scans and focuses the sample budget.\n\n# Examples\n\n## What changed during the incident vs. just before it\n\n```json\n{\n \"query\": {\n \"dateRange\": { \"date_from\": \"2026-07-07T09:30:00Z\", \"date_to\": \"2026-07-07T10:30:00Z\" },\n \"serviceNames\": [\"checkout\"]\n },\n \"baselineDateRange\": { \"date_from\": \"2026-07-07T08:00:00Z\", \"date_to\": \"2026-07-07T09:00:00Z\" }\n}\n```\n\n## What is new or different today vs. the same time last week\n\n```json\n{ \"query\": { \"dateRange\": { \"date_from\": \"-1d\" } } }\n```\n\n## Did the deploy change what the service logs?\n\n```json\n{\n \"query\": {\n \"dateRange\": { \"date_from\": \"2026-07-07T14:00:00Z\" },\n \"serviceNames\": [\"api\"]\n },\n \"baselineDateRange\": { \"date_from\": \"2026-07-07T10:00:00Z\", \"date_to\": \"2026-07-07T14:00:00Z\" }\n}\n```",
@@ -6467,8 +6466,7 @@
"idempotentHint": true,
"openWorldHint": true,
"readOnlyHint": true
- },
- "feature_flag": "logs-patterns-view"
+ }
},
"logs-services-create": {
"description": "Return the top-25 services by log volume in the window, each with log_count, error_count, and error_rate, plus a per-service sparkline. Use this as the entry point when triaging which services are worth alerting on — high volume × non-zero error_rate is the natural alert candidate. Far cheaper than walking attribute-values + per-service counts.",
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.json
index e6a104a24826..09ecf60044e1 100644
--- a/services/mcp/schema/tool-definitions-all.json
+++ b/services/mcp/schema/tool-definitions-all.json
@@ -6817,8 +6817,7 @@
"idempotentHint": true,
"openWorldHint": true,
"readOnlyHint": true
- },
- "feature_flag": "logs-patterns-view"
+ }
},
"logs-patterns-diff": {
"description": "Compare the log patterns of two time windows and return what changed: templates that are **new**, templates whose rate **shifted** (with magnitude, e.g. 4x), and templates that are **gone**. This is the single most useful call for incident triage — \"what is different about now vs. before it broke\" in one round trip, instead of mining two windows yourself and hand-matching templates.\n\nAll parameters must be nested inside a `query` object, with an optional sibling `baselineDateRange`.\n\n# When to use\n\n- **Incident triage (the primary loop):** set `query.dateRange` to the incident window. Omit `baselineDateRange` (defaults to the same window one week earlier) or set it to a known-good window just before the incident. The `new` and biggest `rate_shift` entries are your suspects; pivot to their raw lines with `query-logs`.\n- **Explain a spike:** when a count or sparkline shows a spike (e.g. from `logs-count-ranges`), set `query.dateRange` to the spike window and `baselineDateRange` to the window just before it — the top `new` and `rate_shift` entries are the explanation. This is one call; do not mine the two windows separately and diff them yourself.\n- **Post-deploy check:** current window = since the deploy; `baselineDateRange` = the same-length window just before it. New error-severity templates right after a deploy are the classic regression signature.\n- **\"What changed this week?\"** — current = `-1d`, baseline auto. Good periodic sweep for a service you own.\n\n## Pick the right tool\n\n- Just summarize one window's content → `logs-patterns`.\n- Explain a _count_ change without needing message content → `logs-count-ranges` (cheaper).\n- Use **this** tool when you need to know _which messages_ are new or behaving differently between two periods.\n\n# Reading the response\n\nEntries come sorted most-interesting-first: `new` (by volume), then `rate_shift` (by magnitude), then `gone`, then `unchanged`.\n\n- `classification` — trust the labels; the thresholds already handle sampling honesty:\n - `new` requires clearing a novelty floor (~1% volume share, or any error/fatal lines). Below the floor, absence from the baseline sample is not evidence of novelty.\n - `rate_shift` requires ≥2x change in per-second rate (windows of different lengths are normalized) _and_ enough raw samples on both sides.\n - `unchanged` means \"no confident claim\", not \"provably identical\".\n- `rate_ratio` — current rate / baseline rate. 4.0 = 4x faster now, 0.25 = quartered.\n- `pattern` — full pattern stats including `match_regex` / `match_literal`, so you can pivot straight to the matching lines (same recipe as `logs-patterns`: message regex filter + the pattern's services/severities).\n- **Check `baseline.total_count` before trusting a wall of `new` entries** — an empty or tiny baseline (logging only started recently, service didn't exist last week) makes everything look new.\n- Both windows are mined from samples (`sampled: true`), so counts are estimates and templates rarer than ~1 in 10,000 rows may be invisible in either window.\n\nTemplate identity across the two windows is fingerprint-based (literal content), so the miner rendering `User <*> not found` in one window and `User <num> not found` in the other still compares as one pattern rather than a false new+gone pair.\n\n# Parameters\n\n## query.dateRange\n\nThe current (foreground) window — the period you are investigating. Same format as `logs-patterns`.\n\n## baselineDateRange\n\nOptional, sibling of `query` (not inside it). The comparison window. Omit for the default: the current window shifted back exactly one week, which absorbs daily/weekly volume cycles. Provide explicitly to compare against a pre-deploy or pre-incident period. It does not need to be the same length as the current window — rates are normalized per second.\n\n## query.severityLevels / query.serviceNames / query.searchTerm / query.filterGroup\n\nSame as `logs-patterns`; applied to **both** windows. Scoping by service is recommended — it prunes both scans and focuses the sample budget.\n\n# Examples\n\n## What changed during the incident vs. just before it\n\n```json\n{\n \"query\": {\n \"dateRange\": { \"date_from\": \"2026-07-07T09:30:00Z\", \"date_to\": \"2026-07-07T10:30:00Z\" },\n \"serviceNames\": [\"checkout\"]\n },\n \"baselineDateRange\": { \"date_from\": \"2026-07-07T08:00:00Z\", \"date_to\": \"2026-07-07T09:00:00Z\" }\n}\n```\n\n## What is new or different today vs. the same time last week\n\n```json\n{ \"query\": { \"dateRange\": { \"date_from\": \"-1d\" } } }\n```\n\n## Did the deploy change what the service logs?\n\n```json\n{\n \"query\": {\n \"dateRange\": { \"date_from\": \"2026-07-07T14:00:00Z\" },\n \"serviceNames\": [\"api\"]\n },\n \"baselineDateRange\": { \"date_from\": \"2026-07-07T10:00:00Z\", \"date_to\": \"2026-07-07T14:00:00Z\" }\n}\n```",
@@ -6832,8 +6831,7 @@
"idempotentHint": true,
"openWorldHint": true,
"readOnlyHint": true
- },
- "feature_flag": "logs-patterns-view"
+ }
},
"logs-services-create": {
"description": "Return the top-25 services by log volume in the window, each with log_count, error_count, and error_rate, plus a per-service sparkline. Use this as the entry point when triaging which services are worth alerting on — high volume × non-zero error_rate is the natural alert candidate. Far cheaper than walking attribute-values + per-service counts.",
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/logs-patterns-diff.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/logs-patterns-diff.json
new file mode 100644
index 000000000000..2203186b720b
--- /dev/null
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/logs-patterns-diff.json
@@ -0,0 +1,134 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "properties": {
+ "baselineDateRange": {
+ "description": "Baseline window to compare against. Omit to default to the current window shifted back exactly one week, which absorbs daily and weekly log-volume cycles. Pass an explicit range to compare against a specific period, e.g. pre-deploy or pre-incident.",
+ "properties": {
+ "date_from": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Start of the date range. Accepts ISO 8601 timestamps or relative formats: -7d, -1h, -1mStart, etc."
+ },
+ "date_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "End of the date range. Same format as date_from. Omit or null for \"now\"."
+ }
+ },
+ "type": "object"
+ },
+ "query": {
+ "description": "The patterns query for the current (foreground) window: date range plus any severity/service/search/property filters. The same filters are applied to the baseline window.",
+ "properties": {
+ "dateRange": {
+ "description": "Date range to mine patterns from. Defaults to last hour.",
+ "properties": {
+ "date_from": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Start of the date range. Accepts ISO 8601 timestamps or relative formats: -7d, -1h, -1mStart, etc."
+ },
+ "date_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "End of the date range. Same format as date_from. Omit or null for \"now\"."
+ }
+ },
+ "type": "object"
+ },
+ "filterGroup": {
+ "description": "Property filters applied before mining. Same shape as the query-logs endpoint.",
+ "items": {
+ "properties": {
+ "key": {
+ "description": "Attribute key. For type \"log\", use \"message\". For \"log_attribute\"/\"log_resource_attribute\", use the attribute key (e.g. \"k8s.container.name\").",
+ "type": "string"
+ },
+ "operator": {
+ "description": "Comparison operator.\n\n* `exact` - exact\n* `is_not` - is_not\n* `icontains` - icontains\n* `not_icontains` - not_icontains\n* `starts_with` - starts_with\n* `not_starts_with` - not_starts_with\n* `ends_with` - ends_with\n* `not_ends_with` - not_ends_with\n* `regex` - regex\n* `not_regex` - not_regex\n* `gt` - gt\n* `lt` - lt\n* `is_date_exact` - is_date_exact\n* `is_date_before` - is_date_before\n* `is_date_after` - is_date_after\n* `is_set` - is_set\n* `is_not_set` - is_not_set",
+ "enum": [
+ "exact",
+ "is_not",
+ "icontains",
+ "not_icontains",
+ "starts_with",
+ "not_starts_with",
+ "ends_with",
+ "not_ends_with",
+ "regex",
+ "not_regex",
+ "gt",
+ "lt",
+ "is_date_exact",
+ "is_date_before",
+ "is_date_after",
+ "is_set",
+ "is_not_set"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "description": "\"log\" filters the log body/message. \"log_attribute\" filters log-level attributes. \"log_resource_attribute\" filters resource-level attributes.\n\n* `log` - log\n* `log_attribute` - log_attribute\n* `log_resource_attribute` - log_resource_attribute",
+ "enum": ["log", "log_attribute", "log_resource_attribute"],
+ "type": "string"
+ },
+ "value": {
+ "description": "Value to compare against. String, number, or array of strings. Omit for is_set/is_not_set operators."
+ }
+ },
+ "required": ["key", "type", "operator"],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "searchTerm": {
+ "description": "Full-text search term to filter log bodies before mining.",
+ "type": "string"
+ },
+ "serviceNames": {
+ "description": "Restrict mining to these service names.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "severityLevels": {
+ "description": "Filter by log severity levels before mining.",
+ "items": {
+ "description": "* `trace` - trace\n* `debug` - debug\n* `info` - info\n* `warn` - warn\n* `error` - error\n* `fatal` - fatal",
+ "enum": ["trace", "debug", "info", "warn", "error", "fatal"],
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "required": ["query"],
+ "type": "object"
+}
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/logs-patterns.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/logs-patterns.json
new file mode 100644
index 000000000000..925486bc0d80
--- /dev/null
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/logs-patterns.json
@@ -0,0 +1,106 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "properties": {
+ "query": {
+ "description": "The patterns query to execute.",
+ "properties": {
+ "dateRange": {
+ "description": "Date range to mine patterns from. Defaults to last hour.",
+ "properties": {
+ "date_from": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Start of the date range. Accepts ISO 8601 timestamps or relative formats: -7d, -1h, -1mStart, etc."
+ },
+ "date_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "End of the date range. Same format as date_from. Omit or null for \"now\"."
+ }
+ },
+ "type": "object"
+ },
+ "filterGroup": {
+ "description": "Property filters applied before mining. Same shape as the query-logs endpoint.",
+ "items": {
+ "properties": {
+ "key": {
+ "description": "Attribute key. For type \"log\", use \"message\". For \"log_attribute\"/\"log_resource_attribute\", use the attribute key (e.g. \"k8s.container.name\").",
+ "type": "string"
+ },
+ "operator": {
+ "description": "Comparison operator.\n\n* `exact` - exact\n* `is_not` - is_not\n* `icontains` - icontains\n* `not_icontains` - not_icontains\n* `starts_with` - starts_with\n* `not_starts_with` - not_starts_with\n* `ends_with` - ends_with\n* `not_ends_with` - not_ends_with\n* `regex` - regex\n* `not_regex` - not_regex\n* `gt` - gt\n* `lt` - lt\n* `is_date_exact` - is_date_exact\n* `is_date_before` - is_date_before\n* `is_date_after` - is_date_after\n* `is_set` - is_set\n* `is_not_set` - is_not_set",
+ "enum": [
+ "exact",
+ "is_not",
+ "icontains",
+ "not_icontains",
+ "starts_with",
+ "not_starts_with",
+ "ends_with",
+ "not_ends_with",
+ "regex",
+ "not_regex",
+ "gt",
+ "lt",
+ "is_date_exact",
+ "is_date_before",
+ "is_date_after",
+ "is_set",
+ "is_not_set"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "description": "\"log\" filters the log body/message. \"log_attribute\" filters log-level attributes. \"log_resource_attribute\" filters resource-level attributes.\n\n* `log` - log\n* `log_attribute` - log_attribute\n* `log_resource_attribute` - log_resource_attribute",
+ "enum": ["log", "log_attribute", "log_resource_attribute"],
+ "type": "string"
+ },
+ "value": {
+ "description": "Value to compare against. String, number, or array of strings. Omit for is_set/is_not_set operators."
+ }
+ },
+ "required": ["key", "type", "operator"],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "searchTerm": {
+ "description": "Full-text search term to filter log bodies before mining.",
+ "type": "string"
+ },
+ "serviceNames": {
+ "description": "Restrict mining to these service names.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "severityLevels": {
+ "description": "Filter by log severity levels before mining.",
+ "items": {
+ "description": "* `trace` - trace\n* `debug` - debug\n* `info` - info\n* `warn` - warn\n* `error` - error\n* `fatal` - fatal",
+ "enum": ["trace", "debug", "info", "warn", "error", "fatal"],
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "required": ["query"],
+ "type": "object"
+}
diff --git a/services/mcp/tests/unit/tool-filtering.test.ts b/services/mcp/tests/unit/tool-filtering.test.ts
index 4338a2ea8ffe..43a6dd9d2336 100644
--- a/services/mcp/tests/unit/tool-filtering.test.ts
+++ b/services/mcp/tests/unit/tool-filtering.test.ts
@@ -832,7 +832,6 @@ describe('Tool Filtering - Feature Flags', () => {
expect.arrayContaining([
'logs-alerting',
'logs-anomalies',
- 'logs-patterns-view',
'llm-analytics-datasets',
'tracing',
'visual-review',
@@ -861,7 +860,7 @@ describe('Tool Filtering - Feature Flags', () => {
'experiment-behavior-comparison',
])
)
- expect(flags).toHaveLength(29)
+ expect(flags).toHaveLength(28)
})
it('every loops tool is gated on the loops flag', () => {