Skip to content

[ML] Adds action to add log rate analysis to a case#201549

Merged
rbrtj merged 17 commits intoelastic:mainfrom
rbrtj:log-rate-analysis-cases-attachment
Dec 2, 2024
Merged

[ML] Adds action to add log rate analysis to a case#201549
rbrtj merged 17 commits intoelastic:mainfrom
rbrtj:log-rate-analysis-cases-attachment

Conversation

@rbrtj
Copy link
Copy Markdown
Contributor

@rbrtj rbrtj commented Nov 25, 2024

Summary

Follow up to #197247

Adds action to add Log Rate Analysis Embeddable to a case.

Screen.Recording.2024-11-26.at.14.06.37.mov

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

@peteharverson peteharverson changed the title add attachment to a case [ML] Adds action to add log rate analysis to a case Nov 25, 2024
@rbrtj rbrtj self-assigned this Nov 26, 2024
@rbrtj rbrtj added release_note:enhancement :ml v9.0.0 Team:ML Team label for ML (also use :ml) t// Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis backport:version Backport to applied version labels v8.18.0 labels Nov 26, 2024
@rbrtj rbrtj marked this pull request as ready for review November 26, 2024 13:56
@rbrtj rbrtj requested a review from a team as a code owner November 26, 2024 13:56
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@rbrtj rbrtj requested a review from a team as a code owner November 26, 2024 15:19
@rbrtj rbrtj requested a review from a team as a code owner November 27, 2024 10:26
Copy link
Copy Markdown
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is looking good. Just left a few comments.

@rbrtj rbrtj requested a review from peteharverson November 27, 2024 12:32
Copy link
Copy Markdown
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested latest changes and LGTM

Copy link
Copy Markdown
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great update, LGTM!

Just one thing: Maybe we could move the cases functional test to a separate file log_rate_analysis_cases_embeddable.ts - so if part of either suite fails not everything will be skipped.

const caseAttachmentTooltipContent = useMemo(() => {
if (!showLogRateAnalysisResults) {
return i18n.translate('xpack.aiops.logRateAnalysis.attachToCaseTooltipNoAnalysis', {
defaultMessage: 'Run the analysis first to add results to a case',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defaultMessage: 'Run the analysis first to add results to a case',
defaultMessage: 'Run the analysis first to add results to a case.',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in: #33d5e29

}
if (significantItems.length === 0) {
return i18n.translate('xpack.aiops.logRateAnalysis.attachToCaseTooltipNoResults', {
defaultMessage: 'Cannot add to case because the analysis did not produce any results',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defaultMessage: 'Cannot add to case because the analysis did not produce any results',
defaultMessage: 'Cannot add to case because the analysis did not produce any results.',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in: #33d5e29

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 627 620 -7

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiops 589.6KB 613.9KB +24.3KB
dataVisualizer 614.8KB 614.8KB +39.0B
ml 4.7MB 4.7MB +16.0B
total +24.4KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
aiops 16.2KB 17.3KB +1.1KB
Unknown metric groups

API count

id before after diff
@kbn/aiops-components 36 37 +1

async chunk count

id before after diff
aiops 38 40 +2

History

cc @rbrtj

@rbrtj rbrtj merged commit aa4c39c into elastic:main Dec 2, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12117919595

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Dec 2, 2024
## Summary

Follow up to [elastic#197247](elastic#197247)

Adds action to add Log Rate Analysis Embeddable to a case.

https://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit aa4c39c)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 2, 2024
…202431)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Adds action to add log rate analysis to a case
(#201549)](#201549)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-12-02T10:59:54Z","message":"[ML]
Adds action to add log rate analysis to a case (#201549)\n\n##
Summary\r\n\r\nFollow up to
[#197247](https://github.com/elastic/kibana/issues/197247)\r\n\r\nAdds
action to add Log Rate Analysis Embeddable to a
case.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"aa4c39c11955333176a612fd1b3601c34fcbc8ad","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","v9.0.0","Team:ML","Feature:ML/AIOps","backport:version","v8.18.0"],"title":"[ML]
Adds action to add log rate analysis to a
case","number":201549,"url":"https://github.com/elastic/kibana/pull/201549","mergeCommit":{"message":"[ML]
Adds action to add log rate analysis to a case (#201549)\n\n##
Summary\r\n\r\nFollow up to
[#197247](https://github.com/elastic/kibana/issues/197247)\r\n\r\nAdds
action to add Log Rate Analysis Embeddable to a
case.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"aa4c39c11955333176a612fd1b3601c34fcbc8ad"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201549","number":201549,"mergeCommit":{"message":"[ML]
Adds action to add log rate analysis to a case (#201549)\n\n##
Summary\r\n\r\nFollow up to
[#197247](https://github.com/elastic/kibana/issues/197247)\r\n\r\nAdds
action to add Log Rate Analysis Embeddable to a
case.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956\r\n\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"aa4c39c11955333176a612fd1b3601c34fcbc8ad"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
## Summary

Follow up to [elastic#197247](elastic#197247)

Adds action to add Log Rate Analysis Embeddable to a case.



https://github.com/user-attachments/assets/f45554e1-cef7-4c54-bea5-c509f236a956



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml release_note:enhancement Team:ML Team label for ML (also use :ml) t// v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants