diff --git a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx index 4362f412d5a78..4e1815e754a59 100644 --- a/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx +++ b/x-pack/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx @@ -111,10 +111,14 @@ export const LogEntryExampleMessage: React.FunctionComponent = ({ flyoutOptions: encode({ surroundingLogsId: id, }), - logFilter: encode({ - expression: `${partitionField}: ${dataset}`, - kind: 'kuery', - }), + ...(dataset + ? { + logFilter: encode({ + expression: `${partitionField}: ${dataset}`, + kind: 'kuery', + }), + } + : {}), }, });