-
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
[Fleet] Agent logs UI #83356
[Fleet] Agent logs UI #83356
Conversation
@elasticmachine merge upstream |
@jen-huang You moved it to review, but it still in draft? |
@ph Yes, this PR is ready for review but it's in draft to avoid triggering codeowners for changes to |
@EricDavisX @kevinlog FYI this should include endpoint log too. |
@jen-huang is it too late to make any suggestions while you're in the code? It would be a slight step back for users who have very little Agent activity going on to have to select something to see the last activity (if it wasn't within the last 15 minutes) - could we show some special default 'hybrid' mode where we show up to 10 items or the last 15 minutes if there are more than 10? I know I may be asking you to change a UI component, lol, just citing a common use case that may have additional clicks in it now. Also, would love to do an 'automation and feature coverage' review with you! We are finalizing a process guideline, I will send you the draft and we can chat it. Thank you. |
@EricDavisX Unfortunately the I think it's worth discussing what a good default date range is, though. That is easy to change, I think Logs UI actually uses last 1 day by default. WDYT? cc @hbharding |
I think 'last 1 Day' would suffice, thanks for the discourse |
...plications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx
Show resolved
Hide resolved
…eStartServices and replace usage of useStartDeps
062083f
to
c3325e7
Compare
Pinging @elastic/ingest-management (Feature:Fleet) |
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.
APM changes look good.
I'm not reviewing this but I just wanted to say that this looks amazing and it makes me very happy. :D |
I am curious to know a little more on the refactoring of |
@nchaulet Good question, here are my reasons:
|
x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts
Outdated
Show resolved
Hide resolved
...public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/index.tsx
Outdated
Show resolved
Hide resolved
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.
A few comments but nothing really blocking, I tested locally working really well 🚀
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Distributable file count
Page load bundle
History
To update your PR or re-run it, just comment with: |
* Initial agent log table * Add data and storage services to Kibana context, rename useCore to useStartServices and replace usage of useStartDeps * Initial attempt at adding query bar for log stream * Adjust app layout to allow page content to be full height * Dataset and log level filters, split into smaller files * Use data plugin's `QueryStringInput` component for query bar * Add open in Logs UI link * Clean up unused storage dependency * Remove agent activity log and related dead code * Clean up i18n * Clean up plugin deps, fix routing * Add back storage dependency that data plugin components need * Remove dependency on infra for logs UI link * Change default date range to last one day * Adjust panel padding * Add comment * Move module declarations to top-level x-pack/typings * Fix missed renaming * Remove unused path * Move building of log stream query into separate service with unit tests * Adjust test conditions
Summary
Resolves #77189
Logs
tab in agent details page that shows logs for that agent; the previous Activity log tab and related code was removed<LogStream>
component, controlled by a query bar, dropdown filters, and date pickerelastic_agent
datasetelastic_agent.*
datasets to view logs from, the options are populated from existing logs dataApply
in the Quick select interface of the date pickerView in Logs
, they will be taken to Logs UI with the current state of their view, that is:current agent ID + selected datasets + selected log levels + date picker range
Development notes
useCore
touseStartServices
and replace usage ofuseStartDeps
(removeduseSetupDeps
that was never used)LogStream
component can automatically expand to the available heightx-pack/typings
folder to resolve type check errors, the local APM module declarations are unreadable duringx-pack/test
type check due to some messy dependency trees 😭cytoscape_dagre.d.ts
andreact_vis.d.ts
were movedx-pack/test/plugin_functional/plugins/resolver_test
imports from ->x-pack/plugins/security_solution
->x-pack/plugins/fleet/public
->x-pack/plugins/infra/public
(added in this PR) ->x-pack/plugins/infra/public
@types/react-vis
failed withUnsupported URL Type "link:": link:../elastic-safer-lodash-set
and@types/cytoscape-dagre
doesn't exist, so moving the declaration files seemed to be the cleanest solutionFollow up work
Screenshots