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

[Fleet] Fix links to Logs view to point to Discover in Serverless #171525

Merged
merged 5 commits into from
Nov 21, 2023

Conversation

criamico
Copy link
Contributor

@criamico criamico commented Nov 20, 2023

Fixes #168349

Summary

Fix links to Logs view to point to Discover in Serverless.

As the Logs view UI is not available in serverless, the "Open in logs" buttons should point to Discover instead. Rather than hardcode the url in each of the places where is needed, I extracted a small component that builds the two urls and allows switching in an easier way.
If in the future on of the two links will go away, it will be easier to find those occurrences.

Testing

Test for serverless following these instructions

Error logs in agent activity flyout

  • Enroll an agent and try to cause some error - for instance upgrading an agent that is not upgradeable
  • Click on "Agent Activity" and find the error and a button besides it
  • On stateful the button says "Open in Logs"

Screenshot 2023-11-20 at 13 07 08

  • On serverless is "Open in discover"

Screenshot 2023-11-20 at 13 08 02

  • Check that both show the same logs:

Screenshot 2023-11-16 at 11 49 24
Screenshot 2023-11-16 at 11 48 54

Agent logs
(Same test as above)

  • Enroll an agent
  • Click on the agent and go to the "Logs" tab
  • On stateful the button says "Open in Logs"

Screenshot 2023-11-20 at 13 04 41

  • On serverless is "Open in discover"

Screenshot 2023-11-20 at 13 04 11

  • Check that both show the same logs

Custom Logs UI
There is also a link to logs on custom logs UI but I just linked to discover for that one: https://github.com/elastic/kibana/pull/171525/files#diff-e337aa916d60d0d1033e3298c8c9c33c6a6fcd87a8ded971a4a87f5ccfc0981fR20-R22

@criamico criamico added the Team:Fleet Team label for Observability Data Collection Fleet team label Nov 20, 2023
@criamico criamico self-assigned this Nov 20, 2023
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@criamico criamico changed the title [Fleet] Fix links to Logs view to point to Discover [Fleet] Fix links to Logs view to point to Discover in Serverless Nov 20, 2023
@criamico
Copy link
Contributor Author

@elasticmachine merge upstream

@criamico criamico marked this pull request as ready for review November 20, 2023 12:12
@criamico criamico requested a review from a team as a code owner November 20, 2023 12:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

Some small suggestions but otherwise LGTM 🚀

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Security Solution Cypress Tests #8 / url state sets and reads the url state for timeline by id sets and reads the url state for timeline by id

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 947 948 +1

Async chunks

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

id before after diff
fleet 1.2MB 1.2MB +29.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 151.6KB 151.6KB +75.0B

History

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

cc @criamico

@criamico criamico merged commit 10ec713 into elastic:main Nov 21, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Add links to Discover in serverless when Logs UI not available
6 participants