Skip to content
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] Explain Log Rate Spikes: Histogram fixes. #139933

Merged
merged 12 commits into from
Sep 8, 2022

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Sep 1, 2022

Summary

Fixes histogram styling, some alignments with discover chart.

  • Switch BarSeries to HistogramBarSeries.
  • Fix too generic IDs.
  • Align y axis ticks settings with Discover chart.
  • Fixes horizontal margins.
  • Fixes x domain to avoid empty buckets at start and end of histogram.

Previous:

image

After:

image

Checklist

@walterra walterra added release_note:fix :ml v8.5.0 Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis labels Sep 1, 2022
@walterra walterra self-assigned this Sep 1, 2022
Comment on lines 348 to 351
// temporary fix to reduce horizontal chart margin until fixed in Elastic Charts itself
labelFormat={() => ''}
timeAxisLayerCount={useLegacyTimeAxis ? 0 : 2}
style={useLegacyTimeAxis ? {} : MULTILAYER_TIME_AXIS_STYLE}
Copy link
Member

Choose a reason for hiding this comment

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

This workaround works only with the multilayer time axis and not with the legacy.
So my suggestion is to remove completely the legacyTimeAxis configuration and use only the multilayer one.
If you prefer keep that, you instead should change the labelFormat as:

labelFormat={useLegacyTimeAxis ? undefined : () => ''}

you can double check how it will work by setting the legacy time axis in the Advanced setting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the hint! I'll stick with useLegacyTimeAxis for now so the chart behavior is the same as in Discover.

@walterra walterra added the bug Fixes for quality problems that affect the customer experience label Sep 2, 2022
@walterra walterra marked this pull request as ready for review September 2, 2022 10:49
@walterra walterra requested a review from a team as a code owner September 2, 2022 10:49
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@walterra
Copy link
Contributor Author

walterra commented Sep 5, 2022

@elasticmachine merge upstream

Copy link
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.

LGTM.

Not related to the changes here, as happens before too, but when comparing to the doc count in Discover I noticed that the behavior for the first and last buckets is different here, where you see empty buckets, compared to populated buckets in the Discover chart.

Log rate spikes:
image

Compared to Discover (same time range):

image

@walterra
Copy link
Contributor Author

walterra commented Sep 5, 2022

@peteharverson Thanks for pointing out the empty buckets, fixed them as part of this PR in 2b81837.

Copy link
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.

Latest change to fix end buckets works for me. LGTM

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

LGTM ⚡

@walterra walterra added the v8.4.2 label Sep 8, 2022
@walterra walterra enabled auto-merge (squash) September 8, 2022 09:53
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
aiops 479.7KB 479.8KB +96.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @walterra

@walterra walterra merged commit 1ff209a into elastic:main Sep 8, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 8, 2022
Fixes histogram styling, some alignments with discover chart.

- Switch BarSeries to HistogramBarSeries.
- Fix too generic IDs.
- Align y axis ticks settings with Discover chart.
- Fixes horizontal margins.
- Fixes x domain to avoid empty buckets at start and end of histogram.

(cherry picked from commit 1ff209a)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.4

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

Questions ?

Please refer to the Backport tool documentation

@walterra walterra deleted the ml-aiops-histogram-tweaks branch September 8, 2022 10:50
kibanamachine added a commit that referenced this pull request Sep 8, 2022
Fixes histogram styling, some alignments with discover chart.

- Switch BarSeries to HistogramBarSeries.
- Fix too generic IDs.
- Align y axis ticks settings with Discover chart.
- Fixes horizontal margins.
- Fixes x domain to avoid empty buckets at start and end of histogram.

(cherry picked from commit 1ff209a)

Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:ML/AIOps ML AIOps features: Change Point Detection, Log Pattern Analysis, Log Rate Analysis :ml release_note:fix v8.4.2 v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants