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

[Log Explorer] Add Explorer app locator #165962

Conversation

mohamedhamed-ahmed
Copy link
Contributor

@mohamedhamed-ahmed mohamedhamed-ahmed commented Sep 7, 2023

closes #164995
closes #165618
closes #166596

📝 Summary

Observability Log Explorer Locators:

This PR adds 2 new customized locators to the Observability log explorer profile. At the moment we implemented:

   1- Single dataset selector locator
   2- All dataset selector locator

With more locators to come in the future depending on the use cases.

Log Explorer Locators:

We also added a log explorer locator that navigates to discover, this can be used in case the Observability Log Explorer plugin is disabled.

Logs Onboarding:

The PR also replaces the temp navigation to the default discover we implemented for 8.10 here with the above new Observability Log Explorer locators.

APM:

After disabling infra plugin in serverless projects, APM links to infra locators in serverless have been replaced to use the above locators.

Observability Landing Page:

The landing page now redirects to the Log Explorer if logs-*-* has data in it, otherwise the flow continues as before.

Necessary Refactoring:

To avoid the circular dependency between ObservabilityLogExplorer & ObservabilityOnboarding after each one using the other's locator and importing the necessary types, I moved the type definition for all locators in the deeplinks package.

✅ Testing

  • Onboarding Wizard in Serverless and Stateful

    1. Navigate to the onboarding flow /app/observabilityOnboarding/
    2. Choose either System logs or Stream log files
    3. Go through the onboarding wizard
    4. Click the Explore logs button at the end
    5. You should be redirected to observability log explorer with the integration and dataset preselected.
  • APM links in Serverless

    1. Navigate to APM and click on the logs links as shown in the Demos below
    2. All links should navigate to Observability Log Explorer with the queries set in the search bar.

🎥 Demos

  • APM Serverless
apm_serverless.mov
  • APM Stateful
apm_stateful.mov
  • Onboarding Serverless
onboarding_serverless.mov
  • Onboarding Stateful
onboarding_stateful.mov
  • Observability Landing Page
observability_landing.mov

@mohamedhamed-ahmed mohamedhamed-ahmed added the WIP Work in progress label Sep 7, 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!)

@mohamedhamed-ahmed mohamedhamed-ahmed added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting v8.11.0 Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Sep 7, 2023
@mohamedhamed-ahmed mohamedhamed-ahmed added the Team:APM All issues that need APM UI Team support label Sep 12, 2023
@mohamedhamed-ahmed
Copy link
Contributor Author

/oblt-deploy

@mohamedhamed-ahmed
Copy link
Contributor Author

/oblt-deploy-serverless

@mohamedhamed-ahmed mohamedhamed-ahmed added ci:build-serverless-image and removed WIP Work in progress labels Sep 12, 2023
@mohamedhamed-ahmed
Copy link
Contributor Author

/oblt-deploy-serverless

Copy link
Contributor

@tonyghiani tonyghiani left a comment

Choose a reason for hiding this comment

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

Latest changes LGTM, thanks for this work!

Copy link
Contributor

@yngrdyn yngrdyn left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@maryam-saeidi maryam-saeidi left a comment

Choose a reason for hiding this comment

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

AO changes LGTM (code review only)

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #18 / serverless examples UI Field formats example "before all" hook for "renders field formats example 1"
  • [job] [logs] FTR Configs #7 / serverless observability UI Create Case "before each" hook for "creates a case"

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1482 1487 +5
logExplorer 429 439 +10
observability 438 440 +2
observabilityLogExplorer 41 53 +12
observabilityOnboarding 209 178 -31
total -2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/deeplinks-observability 3 14 +11
logExplorer 6 22 +16
observabilityLogExplorer 0 12 +12
observabilityOnboarding 16 14 -2
total +37

Async chunks

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

id before after diff
apm 3.7MB 3.7MB +487.0B
logExplorer 221.2KB 187.3KB -33.9KB
observability 1.0MB 1.0MB +61.0B
observabilityOnboarding 408.9KB 238.3KB -170.6KB
total -204.0KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
logExplorer 4 7 +3
observabilityLogExplorer 0 1 +1
total +4

Page load bundle

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

id before after diff
logExplorer 6.0KB 34.9KB +29.0KB
observabilityLogExplorer 13.9KB 16.8KB +2.9KB
observabilityOnboarding 5.5KB 5.6KB +72.0B
total +31.9KB
Unknown metric groups

API count

id before after diff
@kbn/deeplinks-observability 3 24 +21
logExplorer 6 22 +16
observabilityLogExplorer 0 12 +12
observabilityOnboarding 17 14 -3
total +46

async chunk count

id before after diff
logExplorer 8 7 -1

ESLint disabled line counts

id before after diff
@kbn/deeplinks-observability 0 1 +1
logExplorer 6 5 -1
observabilityLogExplorer 2 1 -1
total -1

Total ESLint disabled count

id before after diff
@kbn/deeplinks-observability 0 1 +1
logExplorer 8 7 -1
observabilityLogExplorer 2 1 -1
total -1

History

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

@mohamedhamed-ahmed mohamedhamed-ahmed merged commit 3d58a1d into elastic:main Sep 20, 2023
25 checks passed
gergoabraham pushed a commit to gergoabraham/kibana that referenced this pull request Sep 21, 2023
closes elastic#164995
closes elastic#165618
closes elastic#166596

## 📝  Summary

### Observability Log Explorer Locators:

This PR adds 2 new customized locators to the Observability log explorer
profile. At the moment we implemented:

       1- Single dataset selector locator
       2- All dataset selector locator

With more locators to come in the future depending on the use cases.

### Log Explorer Locators:

We also added a log explorer locator that navigates to discover, this
can be used in case the **Observability Log Explorer** plugin is
disabled.

### Logs Onboarding:

The PR also replaces the temp navigation to the default discover we
implemented for[ 8.10
here](elastic#163218) with the above new
Observability Log Explorer locators.

### APM:

After [disabling infra plugin in serverless
projects](elastic#165289), APM links to
infra locators in serverless have been replaced to use the above
locators.

### Observability Landing Page:

The landing page now redirects to the Log Explorer if `logs-*-*` has
data in it, otherwise the flow continues as before.

### Necessary Refactoring:

To avoid the circular dependency between `ObservabilityLogExplorer` &
`ObservabilityOnboarding` after each one using the other's locator and
importing the necessary types, I moved the type definition for all
locators in the `deeplinks` package.

## ✅  Testing

- Onboarding Wizard in Serverless and Stateful

    1. Navigate to the onboarding flow `/app/observabilityOnboarding/`
    2. Choose either System logs or Stream log files
    3. Go through the onboarding wizard
    4. Click the Explore logs button at the end
5. You should be redirected to observability log explorer with the
integration and dataset preselected.

- APM links in Serverless

1. Navigate to APM and click on the logs links as shown in the Demos
below
2. All links should navigate to Observability Log Explorer with the
queries set in the search bar.

## 🎥 Demos

- APM Serverless


https://github.com/elastic/kibana/assets/11225826/7161364e-333f-4ac4-87d5-7f1ffec699b3


- APM Stateful


https://github.com/elastic/kibana/assets/11225826/058c9587-b766-4d4f-a73d-50fd381be4bb


- Onboarding Serverless



https://github.com/elastic/kibana/assets/11225826/ee1cab42-f91c-4558-aa5f-4fa7e8963427

- Onboarding Stateful



https://github.com/elastic/kibana/assets/11225826/a376a12b-499b-4488-a75a-d06e81f8e21d

- Observability Landing Page 



https://github.com/elastic/kibana/assets/11225826/c1c084ca-b1b1-4c4b-a4e6-ae8e157dcf57

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
yngrdyn added a commit that referenced this pull request Sep 27, 2023
`OBSERVABILITY_ONBOARDING_LOCATOR` and
`ObservabilityOnboardingLocatorParams` were removed from
`observability_onboarding` plugin in
[#165962](#165962) and are now
part of `@kbn/deeplinks-observability/locators`.

`datsetName` was transformed into an optional variable in the wizard
state in [#166654](#166654) which
makes sense for first step of custom logs onboarding but it's required
in onboarding saved object.
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:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" Team:APM All issues that need APM UI Team support Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.11.0
Projects
None yet
9 participants