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

[Logs UI] Adapt log entry rate data visualisations #47558

Merged

Conversation

Kerry350
Copy link
Contributor

@Kerry350 Kerry350 commented Oct 8, 2019

Summary

⚠️ Please note there is some outstanding work here to be carried out before merge, detailed below in Pending Work, these points don't require comment ⚠️

This PR closes #47201, and adapts the log rate page to the new sets of data visualisations.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

Detailed overview

These screenshots and GIFs document the full functionality.

Screenshot 2019-10-10 11 30 36
Screenshot 2019-10-10 13 28 41
Screenshot 2019-10-10 22 03 22
Screenshot 2019-10-10 22 03 33
Screenshot 2019-10-10 22 03 51
log_entry_rate_chart
anomalies_charts

Pending work

  • Format all values in the y-axis to 3-digit numbers to try and keep anomaly chart widths as similar as possible
  • Remove "Overall anomaly score" from tooltip and change wording to "Max Anomaly Scores:
    dataset 1 [max-score]" etc
  • Use "pretty" numbers (i.e. 35,000 would be 35k) (User facing)
  • The toolbar text needs adding ("Analyzed x log entries from...") (User facing)
  • "Analyze in ML" buttons need adding (User facing) (Will be deferred to when we stich the two big log rate PRs together)
  • Results should be sorted in the overall annotations chart tooltip (User facing)
  • Amend API integration test (Developer facing)
  • Code for acquiring derivations of data from the results (functions in data_formatters) could potentially be DRY'd up and in some places hoisted. Components like the expanded row will only calculate and memoize their data when actually opened and mounted, and all derivations are memoized, so this isn't major-major. (Developer facing) (Can be deferred post-FF).

(All the user facing work here is small, and will be completed on Monday).

Caveats / issues

Below are some caveats / issues, I don't think any of them are deal breakers. And some are just here to gain a majority opinion on how to proceed.

  • The anomalies charts render annotations for anomalies with a severity score of warning, minor, major and critical. But not low (anything below 3). However, all anomaly scores do contribute to the "Top anomaly score" stat. This means you could see a stat of 2 for "Top anomaly score" but no anomaly annotations on the chart. Removing it from the "Top anomaly score" stat seems misleading. Should we add low severity score annotations to the chart? (These were omitted to avoid too much noise). Should we discount low scores from the "Top anomaly score"? - Result: we will keep all severity gradings (warning, minor, major, critical)

  • The widths of all the charts don't align 100%. This seems quite hard to achieve due to there not being a way to give an explicit width to the chart legend - technically we can hack some surrounding CSS in, but I'm not confident this won't break chart rendering in certain situations. Furthermore, the width of the Y axis can differ slightly based on the values. Even if we were to use a set scale, and "pretty" / formatted numbers, we'd likely want - for example - 10 and 100 to be graphed in the same scale. But if one anomaly chart has a highest value of 8, and another is 10, the pixel width will still be slightly out. - Result: values will all be rendered using 3-digits

  • The loading states are pretty jarring when auto reload is turned on. @jasonrhodes had mentioned other teams were potentially looking into a way to display a placeholder on top of graphs for this sort of situation.

I think that's everything!

@Kerry350 Kerry350 self-assigned this Oct 8, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

Kerry350 and others added 5 commits October 15, 2019 12:15
@elasticmachine
Copy link
Contributor

💔 Build Failed

@Kerry350
Copy link
Contributor Author

@weltenwort Thank you for the thorough review, especially for catching things like the missing translations 😬

most of the comments just refer to cosmetics, so feel free to disregard or defer in the interest of getting things done.

I've responded to almost all of the feedback, the bits I've left are the parts that had questions around them and open comments. As they're not blockers I feel we can defer those changes.

Regarding the data formatters: I know you left it out intentionally in the interest of implementation speed. If we wanted to improve performance and readability it would probably make sense to offer a data structure that groups the results by partition first and histogram second in addition to the current structure from the results hook. These filters and transformations should become a lot simpler after that. We can do that in a follow-up, of course. 😉

Similarly, all the empty-string checks and 'unknown' transformations suggest to me that we should probably do that earlier or factor it out into a normalization function at some later point.

Yep, totally agree with all of this 👍

I'll move these improvements, and all other improvements, to a ticket so nothing gets lost.

Builds seem to have been quite flaky here - some were caused by influx work, but the vast majority are being caused by a Java exception in CI (or that's what it looks like).

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

Awesome work 👏 And thanks for indulging my logs vs log entries nitpicking.

I don't have a strong opinion about the remaining wording questions. Maybe @Titch990 or @katrin-freihofner can weigh in on that.

@weltenwort
Copy link
Member

jenkins, test this again

@elasticmachine
Copy link
Contributor

💔 Build Failed

@katrin-freihofner
Copy link
Contributor

@weltenwort and @Kerry350 you both did a great job! Thank you!

@weltenwort
Copy link
Member

@elasticmachine update branch

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@weltenwort weltenwort merged commit 1fa1e54 into elastic:master Oct 15, 2019
weltenwort pushed a commit to weltenwort/kibana that referenced this pull request Oct 15, 2019
This adapts the log rate page to the new sets of data visualisations.

closes elastic#47201
weltenwort added a commit that referenced this pull request Oct 15, 2019
Backports the following commits to 7.x:
 - [Logs UI] Adapt log entry rate data visualisations (#47558)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature release_note:enhancement Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Logs UI] Adapt log entry rate data visualisations to new designs
7 participants