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 Explorer] Notify the user about new log entries #164074

Open
weltenwort opened this issue Aug 16, 2023 · 5 comments
Open

[Logs Explorer] Notify the user about new log entries #164074

weltenwort opened this issue Aug 16, 2023 · 5 comments
Labels
Feature:LogsExplorer Logs Explorer feature Team:obs-ux-logs Observability Logs User Experience Team

Comments

@weltenwort
Copy link
Member

weltenwort commented Aug 16, 2023

📓 Summary

Since an auto-refresh is pretty heavy-handed and can disrupt the user experience, we should consider other options of notifying the user about new log entries. This is especially important when the user has just started on-boarding new log entries but configuration rollout and ingest is delayed. Therefore, when the user views log entries in a relative time range that ends now, we should notify them about the availability of new log entries without disrupting their current view.

✔️ Acceptance criteria

  • When the user starts viewing log entries for a relative time range ending now, the log explorer regularly checks in the background whether there are newer log entries than the newest one previously fetched. This takes into account the applied filters.
  • When newer log entries are found, the user is notified about that. This could be via a toast message or some other UI indicator.
  • The notification has a call to action, that refreshes the data.
  • The notification only happens once until the user manually changes the filters or refreshes, so the user is not flooded with notifications.

💡 Implementation hints

stateDiagram-v2
  state is_now <<choice>>
  state has_new <<choice>>
  state "idle" as idle
  state "waiting" as waiting
  state "checking for newer" as checking
  state "notifying" as notifying
  
  [*] --> is_now
  is_now --> waiting: relative time range ends with `now`
  is_now --> idle: else
  waiting --> checking: after delay
  checking --> has_new
  has_new --> notifying: has newer entries
  has_new --> waiting: else
  notifying --> is_now: refetched
  idle --> is_now: refetched
Loading
@weltenwort weltenwort added Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Aug 16, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@ruflin
Copy link
Contributor

ruflin commented Aug 17, 2023

I quite like this idea and sounds familiar from how other tools deal with updates without interrupting you reading a specific message.

Screenshot_20230817-154452

Going into tech details: How do you expect the query to look like against Elasticsearch to keep the overhead to a minimum? Would we show users how many new messages are there and keep updating it from time to time?

@weltenwort
Copy link
Member Author

weltenwort commented Aug 17, 2023

I would start with a query that applies the same filters as the "main" query, but use size: 0, terminate_after: 1 and search_after with the newest timestamp seen in the previous query. And once we have found new data (i.e. are in the "notifying" state in my state machine from the description) we can stop checking until the user has caused a refetch.

@formgeist formgeist changed the title [Log Explorer] Notify the user about new log entries [Explorer] Notify the user about new log entries Sep 6, 2023
@gbamparop gbamparop added Team:obs-ux-logs Observability Logs User Experience Team and removed Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Nov 9, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

@botelastic botelastic bot added needs-team Issues missing a team label and removed needs-team Issues missing a team label labels Nov 9, 2023
@gbamparop gbamparop added Feature:LogsExplorer Logs Explorer feature and removed Feature:Logs UI Logs UI feature labels Nov 10, 2023
@isaclfreire
Copy link

I started to do some explorations about this issue in this Figma file. To some level, I think this discussion relates to the dataset activity (#171394)

@tonyghiani tonyghiani changed the title [Explorer] Notify the user about new log entries [Logs Explorer] Notify the user about new log entries Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:LogsExplorer Logs Explorer feature Team:obs-ux-logs Observability Logs User Experience Team
Projects
None yet
Development

No branches or pull requests

5 participants