-
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
[Logs UI] Use async search in the log stream page #90303
[Logs UI] Use async search in the log stream page #90303
Conversation
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
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.
Code looks good, nice to see the higher order component gone 👍
I did find a couple of bugs in the functionality though:
- Using the filter bar seems to throw an error.
- When I load some log entries, then go to another page, and then come back to the Stream page, it says "There are no log messages to display." I have to click "Check for new data" to see entries again. On that navigation back to the Stream there isn't a request in the network panel.
import { useLogStreamContext } from '../../../containers/logs/log_stream'; | ||
import { datemathToEpochMillis, isValidDatemath } from '../../../utils/datemath'; | ||
|
||
// FIXME Duplicated from <LogStream />. See where to put this |
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.
Should this be fixed before merge?
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 think I'm OK with the duplication. We might want the pagination to work differently here than in the <LogStream />
component.
The subscription timing is slightly unpredictable due to React's effect execution order. This way initial requests won't get lost. The response$ is multicast already due to `share()`, so I don't expect any negative consequences. (famous last words)
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.
The two bugs I experienced are fixed now. Great work 🎉
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
) Co-authored-by: Felix Stürmer <[email protected]> Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Felix Stürmer <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Summary
Part of #86439
This PR modifies the log stream page to make use of async searches. To do so it replaces the existing
useLogEntries
container withuseLogStream
, which already uses async search.Summary of changes
<WithStreamItems>
HOC.fetchPrevious
andfetchNext
callbacks inuseLogStream
, to allow fetching before or after the timestamp range. This is necessary for the "extend range" buttons to work correctly.useLogEntries
hook./log_entries/entries
endpoint and its related types.