-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[ML] AIOps: Fixes runtime mappings in pattern analysis #188530
[ML] AIOps: Fixes runtime mappings in pattern analysis #188530
Conversation
Pinging @elastic/ml-ui (:ml) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, also tested with on the log pattern analysis page in the ML plugin. I added a note to the log rate analysis meta issue that we have to follow up there to consider runtime fields too: #187683
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and LGTM
@darnautov I did a quick test with change point detection, and doesn't look like we support queries / filters on runtime mappings there either?
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
Runtime mappings need to be passed to the categorization request factory function and the field validation function. Initially they were excluded because we only allow pattern analysis on text fields and it is not possible to create a text runtime field. However it is possible to apply a filter which uses a runtime field and doing so causes pattern analysis to fail. @walterra I have not investigated log rate analysis' behaviour, in this PR I have just updated the call to `createCategoryRequest` to pass `undefined` To test, create a runtime mapping in the data view. Use this in the query bar or in a filter in Discover and ML's Log Pattern Analysis page. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit afe3b0f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… (#188759) # Backport This will backport the following commits from `main` to `8.15`: - [[ML] AIOps Fixing runtime mappings in pattern analysis (#188530)](#188530) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"James Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2024-07-19T14:38:19Z","message":"[ML] AIOps Fixing runtime mappings in pattern analysis (#188530)\n\nRuntime mappings need to be passed to the categorization request factory\r\nfunction and the field validation function.\r\nInitially they were excluded because we only allow pattern analysis on\r\ntext fields and it is not possible to create a text runtime field.\r\nHowever it is possible to apply a filter which uses a runtime field and\r\ndoing so causes pattern analysis to fail.\r\n\r\n@walterra I have not investigated log rate analysis' behaviour, in this\r\nPR I have just updated the call to `createCategoryRequest` to pass\r\n`undefined`\r\n\r\nTo test, create a runtime mapping in the data view. Use this in the\r\nquery bar or in a filter in Discover and ML's Log Pattern Analysis page.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"afe3b0f42c5d22d84a5cf06ca37462c6918e3bc5","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:ML/AIOps","v8.15.0","v8.16.0"],"title":"[ML] AIOps Fixing runtime mappings in pattern analysis","number":188530,"url":"#188530 AIOps Fixing runtime mappings in pattern analysis (#188530)\n\nRuntime mappings need to be passed to the categorization request factory\r\nfunction and the field validation function.\r\nInitially they were excluded because we only allow pattern analysis on\r\ntext fields and it is not possible to create a text runtime field.\r\nHowever it is possible to apply a filter which uses a runtime field and\r\ndoing so causes pattern analysis to fail.\r\n\r\n@walterra I have not investigated log rate analysis' behaviour, in this\r\nPR I have just updated the call to `createCategoryRequest` to pass\r\n`undefined`\r\n\r\nTo test, create a runtime mapping in the data view. Use this in the\r\nquery bar or in a filter in Discover and ML's Log Pattern Analysis page.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"afe3b0f42c5d22d84a5cf06ca37462c6918e3bc5"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"#188530 AIOps Fixing runtime mappings in pattern analysis (#188530)\n\nRuntime mappings need to be passed to the categorization request factory\r\nfunction and the field validation function.\r\nInitially they were excluded because we only allow pattern analysis on\r\ntext fields and it is not possible to create a text runtime field.\r\nHowever it is possible to apply a filter which uses a runtime field and\r\ndoing so causes pattern analysis to fail.\r\n\r\n@walterra I have not investigated log rate analysis' behaviour, in this\r\nPR I have just updated the call to `createCategoryRequest` to pass\r\n`undefined`\r\n\r\nTo test, create a runtime mapping in the data view. Use this in the\r\nquery bar or in a filter in Discover and ML's Log Pattern Analysis page.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"afe3b0f42c5d22d84a5cf06ca37462c6918e3bc5"}}]}] BACKPORT--> Co-authored-by: James Gowdy <jgowdy@elastic.co>
Runtime mappings need to be passed to the categorization request factory function and the field validation function.
Initially they were excluded because we only allow pattern analysis on text fields and it is not possible to create a text runtime field.
However it is possible to apply a filter which uses a runtime field and doing so causes pattern analysis to fail.
@walterra I have not investigated log rate analysis' behaviour, in this PR I have just updated the call to
createCategoryRequest
to passundefined
To test, create a runtime mapping in the data view. Use this in the query bar or in a filter in Discover and ML's Log Pattern Analysis page.