-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Anomaly Explorer: Display markers for scheduled events in distribution type anomaly charts #192377
[ML] Anomaly Explorer: Display markers for scheduled events in distribution type anomaly charts #192377
Conversation
Pinging @elastic/ml-ui (:ml) |
…ution-anomaly-charts
It is a small PR, but the changes may have some implications, so I've tagged 3 people. |
@@ -105,6 +105,7 @@ export interface ChartPoint { | |||
byFieldName?: string; | |||
numberOfCauses?: number; | |||
scheduledEvents?: any[]; | |||
isFakeDataPoint?: boolean; |
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: Maybe we can think of another name for this flag since this isn't really about fake or dummy data but just about the schedule event marker. Something like isScheduledEventMarkerWithoutData
but less wordy 😅 . Maybe isScheduledEventOnly
/isScheduleEventMarker
?
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.
This property isn't really needed so I got rid of it 👍
…ution-anomaly-charts
@@ -590,7 +610,11 @@ export class ExplorerChartDistribution extends React.Component { | |||
}); | |||
} | |||
} | |||
} else if (chartType !== CHART_TYPE.EVENT_DISTRIBUTION) { | |||
} else if ( | |||
chartType !== CHART_TYPE.EVENT_DISTRIBUTION && |
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.
I am still seeing undefined
appear in the axis labels for a rare
job:
You can reproduce with the filebeat_ecs
data, using the 'rare' job wizard to create a job with this config:
"bucket_span": "3h",
"detectors": [
{
"detector_description": "rare by \"http.request.method\"",
"function": "rare",
"by_field_name": "http.request.method",
"detector_index": 0
}
],
"influencers": [
"http.request.method"
],
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.
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.
Retested @rbrtj and I can no longer reproduce this with the undefined
label!
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 latest changes and LGTM
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, great work!
…ution-anomaly-charts
…ution-anomaly-charts
…ution-anomaly-charts
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @rbrtj |
…bution type anomaly charts (elastic#192377) ## Summary Fix for [elastic#129304](elastic#129304) Previously, for distribution type charts, we displayed calendar event markers only for anomalous data points. The changes improve the display of event markers for such chart types, including showing calendar event markers even when there is no underlying data point. | Scenario | Before | After | | :---: | :---: | :---: | | Rare chart | ![image](https://github.com/user-attachments/assets/c3e186c0-0ec8-434f-a845-3f9e703431dd) | ![image](https://github.com/user-attachments/assets/3dd51cd1-6972-4343-bbc8-8e5f38d7c6bd) | | Population chart | ![Zrzut ekranu 2024-09-9 o 16 16 01](https://github.com/user-attachments/assets/df22dc40-3c8b-46fe-9a5a-02a41278245c) | ![image](https://github.com/user-attachments/assets/c198e75e-14c8-4194-9d71-2358d25f21d5) | | Single metric chart (no difference) | ![image](https://github.com/user-attachments/assets/d0546ba0-46b1-4d2e-9976-fe49bcd4d2da) | ![image](https://github.com/user-attachments/assets/c11ec696-b1f4-4ddf-9542-037b8dd2d31f) | (cherry picked from commit d5b1fdf)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…distribution type anomaly charts (#192377) (#193118) # Backport This will backport the following commits from `main` to `8.x`: - [[ML] Anomaly Explorer: Display markers for scheduled events in distribution type anomaly charts (#192377)](#192377) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Robert Jaszczurek","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-17T07:53:32Z","message":"[ML] Anomaly Explorer: Display markers for scheduled events in distribution type anomaly charts (#192377)\n\n## Summary\r\n\r\nFix for [#129304](https://github.com/elastic/kibana/issues/129304)\r\n\r\nPreviously, for distribution type charts, we displayed calendar event\r\nmarkers only for anomalous data points. The changes improve the display\r\nof event markers for such chart types, including showing calendar event\r\nmarkers even when there is no underlying data point.\r\n\r\n| Scenario | Before | After |\r\n| :---: | :---: | :---: |\r\n| Rare chart |\r\n![image](https://github.com/user-attachments/assets/c3e186c0-0ec8-434f-a845-3f9e703431dd)\r\n|\r\n![image](https://github.com/user-attachments/assets/3dd51cd1-6972-4343-bbc8-8e5f38d7c6bd)\r\n|\r\n| Population chart | ![Zrzut ekranu 2024-09-9 o 16 16\r\n01](https://github.com/user-attachments/assets/df22dc40-3c8b-46fe-9a5a-02a41278245c)\r\n|\r\n![image](https://github.com/user-attachments/assets/c198e75e-14c8-4194-9d71-2358d25f21d5)\r\n|\r\n| Single metric chart (no difference) |\r\n![image](https://github.com/user-attachments/assets/d0546ba0-46b1-4d2e-9976-fe49bcd4d2da)\r\n|\r\n![image](https://github.com/user-attachments/assets/c11ec696-b1f4-4ddf-9542-037b8dd2d31f)\r\n|","sha":"d5b1fdf49af8eb23210e3b15a20fe1f9b660eea8","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Feature:Anomaly Detection","v9.0.0","Team:ML","v8.16.0"],"title":"[ML] Anomaly Explorer: Display markers for scheduled events in distribution type anomaly charts","number":192377,"url":"https://github.com/elastic/kibana/pull/192377","mergeCommit":{"message":"[ML] Anomaly Explorer: Display markers for scheduled events in distribution type anomaly charts (#192377)\n\n## Summary\r\n\r\nFix for [#129304](https://github.com/elastic/kibana/issues/129304)\r\n\r\nPreviously, for distribution type charts, we displayed calendar event\r\nmarkers only for anomalous data points. The changes improve the display\r\nof event markers for such chart types, including showing calendar event\r\nmarkers even when there is no underlying data point.\r\n\r\n| Scenario | Before | After |\r\n| :---: | :---: | :---: |\r\n| Rare chart |\r\n![image](https://github.com/user-attachments/assets/c3e186c0-0ec8-434f-a845-3f9e703431dd)\r\n|\r\n![image](https://github.com/user-attachments/assets/3dd51cd1-6972-4343-bbc8-8e5f38d7c6bd)\r\n|\r\n| Population chart | ![Zrzut ekranu 2024-09-9 o 16 16\r\n01](https://github.com/user-attachments/assets/df22dc40-3c8b-46fe-9a5a-02a41278245c)\r\n|\r\n![image](https://github.com/user-attachments/assets/c198e75e-14c8-4194-9d71-2358d25f21d5)\r\n|\r\n| Single metric chart (no difference) |\r\n![image](https://github.com/user-attachments/assets/d0546ba0-46b1-4d2e-9976-fe49bcd4d2da)\r\n|\r\n![image](https://github.com/user-attachments/assets/c11ec696-b1f4-4ddf-9542-037b8dd2d31f)\r\n|","sha":"d5b1fdf49af8eb23210e3b15a20fe1f9b660eea8"}},"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/192377","number":192377,"mergeCommit":{"message":"[ML] Anomaly Explorer: Display markers for scheduled events in distribution type anomaly charts (#192377)\n\n## Summary\r\n\r\nFix for [#129304](https://github.com/elastic/kibana/issues/129304)\r\n\r\nPreviously, for distribution type charts, we displayed calendar event\r\nmarkers only for anomalous data points. The changes improve the display\r\nof event markers for such chart types, including showing calendar event\r\nmarkers even when there is no underlying data point.\r\n\r\n| Scenario | Before | After |\r\n| :---: | :---: | :---: |\r\n| Rare chart |\r\n![image](https://github.com/user-attachments/assets/c3e186c0-0ec8-434f-a845-3f9e703431dd)\r\n|\r\n![image](https://github.com/user-attachments/assets/3dd51cd1-6972-4343-bbc8-8e5f38d7c6bd)\r\n|\r\n| Population chart | ![Zrzut ekranu 2024-09-9 o 16 16\r\n01](https://github.com/user-attachments/assets/df22dc40-3c8b-46fe-9a5a-02a41278245c)\r\n|\r\n![image](https://github.com/user-attachments/assets/c198e75e-14c8-4194-9d71-2358d25f21d5)\r\n|\r\n| Single metric chart (no difference) |\r\n![image](https://github.com/user-attachments/assets/d0546ba0-46b1-4d2e-9976-fe49bcd4d2da)\r\n|\r\n![image](https://github.com/user-attachments/assets/c11ec696-b1f4-4ddf-9542-037b8dd2d31f)\r\n|","sha":"d5b1fdf49af8eb23210e3b15a20fe1f9b660eea8"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Robert Jaszczurek <[email protected]>
Summary
Fix for #129304
Previously, for distribution type charts, we displayed calendar event markers only for anomalous data points. The changes improve the display of event markers for such chart types, including showing calendar event markers even when there is no underlying data point.