-
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: Tweak log rate changes in log rate analysis results table. #188648
[ML] AIOps: Tweak log rate changes in log rate analysis results table. #188648
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.
Other than a suggestion for a slight edit to the text, tested and LGTM
x-pack/packages/ml/aiops_log_rate_analysis/get_log_rate_change.ts
Outdated
Show resolved
Hide resolved
I noticed a bug how the log rate change text was calculated and updated. Because we always calculated it based on the window parameters selected in the chart, if you moved the brushes after the analysis was done, it would also update the text in the log rate change columns. I fixed it by moving Before: After: Fixed in fb8a96d. |
💔 Build Failed
Failed CI StepsMetrics [docs]Module Count
Async chunks
History
cc @walterra |
@@ -80,7 +85,12 @@ export const logRateAnalysisResultsSlice = createSlice({ | |||
resetGroups: (state) => { | |||
state.significantItemsGroups = []; | |||
}, | |||
resetAll: () => getDefaultState(), | |||
// reset the results but keeps |
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.
Nit: unfinished comment explanation?
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.
Thanks for spotting this! Fixed in 6941aa7.
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.
LGTM ⚡
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @walterra |
…from analysis (not just grouping) (#188913) ## Summary Part of #187684. So far the popover to filter fields was only available when grouping was enabled. This PR updates the behavior so it's available all the time and can be used to exclude field candidates from the analysis. If we detect the index to be based on an ECS schema, we auto-select a set of predefined fields. Changes in this PR: - Creates a new route `/internal/aiops/log_rate_analysis/field_candidates` to be able to fetch field candidates independent of the main streaming API call. - Fixes the code to consider "remaining" field candidates to also consider text field candidates. This was originally developed to allow to continue an analysis that errored for some reason. We use that option to also pass on the custom field list from the field selection popover. - Fetching the field candidates is done in a new redux slice `logRateAnalysisFieldCandidatesSlice` using an async thunk. - Filters the list of field candidates by a predefined field of allowed fields when an ECS schema gets detected. - Renames `fieldCandidates` to `keywordFieldCandidates` for clearer distinction against `textFieldCandidates`. - Refactors `getLogRateAnalysisTypeForCounts` args to a config object. - Bump the API version for the full log rate analysis to version 3. We missed bumping the version in #188648. This update manages proper versioning between v2 and v3, also the API integration tests cover both versions. [aiops-log-rate-analysis-fields-filter-0001.webm](https://github.com/user-attachments/assets/e3ed8d5b-f01c-42ef-8033-caa7135b8cc0) ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Summary
Part of #187684.
This moves functions related to log rate changes to the
@kbn/aiops_log_rate_analysis
package.getLogRateAnalysisType
was renamed togetLogRateAnalysisTypeForHistogram
to indicate its use with histogram data.getLogRateAnalysisTypeForCounts
was added for cases where we don't have the histogram data available but just the doc counts for baseline an deviation time ranges. This isn't used yet as of this PR but will be in a follow up in combination with the o11y AI assistant.getSwappedWindowParameters
is a helper to consolidate inline code that's used to swap baseline and deviation when we detected a dip in log rate.10x
will now be rounded to one digit to avoid messages like1x increase
.45 up from 0 in baseline
/down to 0 from 45 in baseline
.Checklist