Closes#171613
## Summary
This PR adds the viewInApp URL to the custom threshold rule type. This
URL will send the user to the log explorer with the selected data view
and the rule's query filter. If there is only one document aggregation,
then the filter related to this aggregation will be added as shown
below:
|Rule|Discover with pre-fill data|
|---|---|
||
For the ad-hoc data view, you should be able to see the selected index
pattern in discover similar to this:
<img
src="046493ae-ba59-46b7-a40f-68d1836d43f1"
width=400 />
### 🧪 How to test
- Check the viewInApp URL both in action variables and the alert table
for the following scenarios:
- A rule with a persisted data view
- A rule with an ad-hoc data view
- A rule with count aggregation and filter
- A rule with an optional query filter
- A rule with non-count aggregation
In all the above scenarios, the starting time in the Discover should be
before the alert's start time.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## 📓 Summary
Closes#171847
This work adds a new `size` parameter to the customization extension
point for the `flyout`, enabling consumers to increase/decrease it based
on requirements.
It also set the Log Explorer size to `60%` since both `m` and `l` sizes
didn’t fit with the designed size.
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
## 📓 Summary
Closes#170721
These changes add icons for the cloud provider and service fields in the
Log detail flyout.
Regarding the Package Icon next to the dataset field, it should require
a remote request to determine what package is part of the current
dataset. We haven't determined this part yet, so we'll keep it for an
upcoming implementation.
fc882810-6b0f-40ee-9727-762f57ad01cc
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Achyut Jhunjhunwala <achyut.jhunjhunwala@elastic.co>
## Summary
Fixes the issue when the message is added as a filter, discover
component surrounds the value with the <mark> tag in order to highlight
the field. Since our message field is inside a `EuiCodeBlock` it cannot
be highlighted and hence should not support adding of this tag.
### Before

### After

## 📓 Summary
Closes#170391
This work adds a new `title` parameter for the flyout customization and
sets the `Log details` title for the customized Log Explorer flyout.
<img width="1498" alt="Screenshot 2023-11-09 at 12 04 02"
src="ba6c136c-9e3c-4d9d-993d-121cd9be1f5e">
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Updates new teams as codeowners for Observability team changes.
Also took the opportunity to:
- Delete some paths that no longer exist
- Split infra code ownership between teams (from #168992)
## 📓 Summary
Closes#169506
This PR introduces a mechanism to apply customizations on the
LogExplorer component.
The first necessary customization which is implemented is for the flyout
detail, allowing the consumer to display additional content on top of
what is already displayed.
This is a temporary solution which will be updated and embedded in a
more structured customization system as a result of the work done for
https://github.com/elastic/kibana/issues/165255.
The current solution creates already a context to allow granular
consumption of the customizations only for those subtrees where a
specific customization should apply.
The LogAIAssistant is used to customize the current LogExplorer as the
first usage of this customization.
c9e6b40e-e636-456a-9e19-1778c26142db
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## 📓 Summary
Closes#169501🛑 ~**Merge blocked by:** https://github.com/elastic/kibana/pull/169634~
This work implements the first frame for a detailed log flyout.
It adds highlight on the log level, timestamp and message details for a
log.
This first layer of customization will work as a base for all the
upcoming enhancements on the flyout detail.
a1c2997c-5fef-4899-836f-ff810de3f148
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Achyut Jhunjhunwala <achyut.jhunjhunwala@elastic.co>
## 📓 Summary
Closes#166595
This work set the default breakdown field for the Log Explorer to be
`log.level`.
63a75990-dafc-40d8-89cc-90c2afbdebf0
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
## 📓 Summary
These changes set an explicit version of the Fleet API when consumed by
the Log Explorer to prevent API failures while developing locally due to
the missing configuration parameter `server.versioned.versionResolution:
oldest`
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
## 📓 Summary
Update login logic, sorting and search algorithm to stabilize the flaky
tests for Log Explorer.
Closes#165915Closes#165916Closes#165975Closes#166016Closes#166672Closes#166675Closes#166817Closes#167058Closes#167189Closes#167499Closes#167515Closes#167562Closes#167567Closes#167621Closes#167664Closes#167773
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/167023.
### Changes
- `EsqlSelector` was created. This component is in charge of rendering
the `Try ESQL` button.
#### Before
<img width="1905" alt="image"
src="9ffc304f-b68c-4871-8524-1239123f5826">
#### After
<img width="1900" alt="image"
src="b95e8739-b93b-47f7-884e-519b73b2ccda">
- It works as a link, so users are able to open it in a new tab if
desired
<img width="1899" alt="image"
src="d6390ba2-5010-4ed5-99cb-4c3f6e099dfe">
- It navigates to discover in `ES|QL` mode
1f083c2d-a06f-4f0b-9cbb-5958edcb9cce
##### For serverless
<img width="1896" alt="image"
src="48712921-85f7-4848-9e71-426bded04913">
- When `discover:enableESQL` is disabled
<img width="1901" alt="image"
src="4267e03b-7b46-4477-813b-65a8a04e6329">
### Missing
UI tests will come as part of a new PR.
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## 📓 Summary
Closes#166848
This work adds a new tab to navigate Data View from the Log Explorer
selector.
In this first iteration, when the user selects a data view, we move into
discovering preselecting and loading the data view of choice.
**N.B.**: this recording is made on a setup where I have no installed
integrations, so having the no integrations panel is the expected
behaviour.
e8d1f622-86fb-4841-b4cc-4a913067d2cc
## Updated selector state machine
<img width="1492" alt="Screenshot 2023-09-22 at 12 15 44"
src="c563b765-6c6c-41e8-b8cd-769c518932c3">
## New DataViews state machine
<img width="995" alt="Screenshot 2023-09-22 at 12 39 09"
src="e4e43343-c915-42d8-8660-a2ee89f8d595">
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
closes https://github.com/elastic/kibana/issues/166440
This PR applies compressed style to the control group container.
<img width="699" alt="Screenshot 2023-09-27 at 14 44 51"
src="7318c0aa-c00e-44e9-9d29-f2f0deb5b791">
## 📓 Summary
These changes fix the type-check issues related to infra obs UI code.
It also includes some fixes for the APM plugin that were stopping the
check step from passing.
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
## 📓 Summary
Closes#165217
This work implements a new extension point in the Discover customization
framework to allow customizing the flyout content. Although it enables
customizing only the actions displayed on top, it could be enhanced for
additional flyout customizations in the future.
To keep it simple and familiar to other customizations, it relies on a
similar API as the `top_nav` customization, allowing one to disable
default actions and insert additional ones.
```ts
/**
* Hide flyout actions to prevent rendering hard-coded actions.
*/
customizations.set({
id: 'flyout',
actions: {
defaultActions: {
viewSingleDocument: { disabled: true },
viewSurroundingDocument: { disabled: true },
},
},
});
```
## 🧪 Testing
- Navigate to `/app/observability-log-explorer` and expand the flyout
for any grid entry.
The actions on top of the flyout should not be displayed, only the title
and the pagination control should appear.
- Navigate to `/app/discover` and expand the flyout for any grid entry.
The actions for viewing a single documents or surrounding documents
should be displayed.
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
## 📓 Summary
Closes#166056
This PR adds a new override to the `uiSetting` service, allowing it to
override specific UI preferences.
In this case, we'll overwrite the `hideAnnouncements` preference to be
true, so that discover-specific announcements won't be displayed for the
Log Explorer app.
50dade20-1902-4f4a-8615-3e1f7a964522
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## 📓 Summary
**Main task**
Closes#165309
**Skipped tests fixes**
Closes#165839Closes#165520Closes#166494
This work refactors the UX for browsing integrations and uncategorized
datasets.
fadbf952-5a03-4747-b68a-29ed7e864120
## 💡 Review hints
- To reflect the UI changes, the Dataset selector state machine has been
updated as described by the chart attached.
The main difference consists of new events to navigate between tabs and
a nested history state, to keep both track of the last opened tab and,
for the integration tab, of the latest panel.
<img width="1531" alt="Screenshot 2023-09-07 at 14 26 21"
src="12da24e8-8300-4788-8382-71a4cf9748c8">
## 🧪 Tests suite
With the test updates to match the new UI, the selector tests suite now
is:
```
↳ Observability Log Explorer
↳ Dataset Selector
↳ as consistent behavior
↳ should always display the Integrations and Uncategorized top level tabs
↳ should always display the "Show all logs" action
↳ when open on the integrations tab
↳ should display an error prompt if could not retrieve the integrations
↳ should display an empty prompt for no integrations
↳ when open on the uncategorized tab
↳ should display a loading skeleton while loading uncategorized datasets
↳ should display an error prompt if could not retrieve the datasets
↳ should display an empty prompt for no uncategorized data streams
↳ with installed integrations and uncategorized data streams
↳ when open on the integrations tab
↳ should display a list of installed integrations
↳ should sort the integrations list by the clicked sorting option
↳ should filter the integrations list by the typed integration name
↳ should display an empty prompt when the search does not match any result
↳ should load more integrations by scrolling to the end of the list
↳ clicking on integration and moving into the second navigation level
↳ should display a list of available datasets
↳ should sort the datasets list by the clicked sorting option
↳ should filter the datasets list by the typed dataset name
↳ should update the current selection with the clicked dataset
↳ when open on the uncategorized tab
↳ should display a list of available datasets
↳ should sort the datasets list by the clicked sorting option
↳ should filter the datasets list by the typed dataset name
↳ should update the current selection with the clicked dataset
↳ when open/close the selector
↳ should restore the latest navigation panel
↳ should restore the latest search results
↳ when switching between tabs or integration panels
↳ should remember the latest search and restore its results
```
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
closes https://github.com/elastic/kibana/issues/164995
closes https://github.com/elastic/kibana/issues/165618
closes https://github.com/elastic/kibana/issues/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](https://github.com/elastic/kibana/pull/163218) with the above new
Observability Log Explorer locators.
### APM:
After [disabling infra plugin in serverless
projects](https://github.com/elastic/kibana/pull/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
7161364e-333f-4ac4-87d5-7f1ffec699b3
- APM Stateful
058c9587-b766-4d4f-a73d-50fd381be4bb
- Onboarding Serverless
ee1cab42-f91c-4558-aa5f-4fa7e8963427
- Onboarding Stateful
a376a12b-499b-4488-a75a-d06e81f8e21d
- Observability Landing Page
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>
closes https://github.com/elastic/kibana/issues/166247
## 📝 Summary
This PR changes the display of datasets in the dataset selector so that
we only show the dataset name and not the whole index pattern.
ex:
- `logs-foo-*` ➡️ `foo`
- `logs-bar-*` ➡️ `bar`
## ✅ Testing
1. Navigate to the observability log explorer
2. Click the dataset selector and choose Uncategorized
3. Observe how the datasets are represented
## 🎥 Demo
8a6a1212-46d5-4ceb-bf38-cf13d1b3e555
## 📓 Summary
Closes#165482Closes#165489
This PR apply new default preferences to the DataGrid for the Log
Explorer:
- Display and resize additional columns for `service.name (240px)` and
`host.name (320px)` fields. The column's width is taken by the average
length of those specific fields.
- Display rows with single-line height by default.
<img width="3004" alt="data_grid"
src="48d69762-969a-49a5-a6b1-fc86eeaf86a7">
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## 📓 Summary
Closes#165220
This PR introduces a new fallback link from the Log Explorer application
to Discover.
To correctly retrieve the details required to correctly navigate to
Discover with the used data view and filters, the LogExplorer component
accepts now a new `state$` behaviour subject as a property that can be
used to notify the consumers of any change from the internal state.
c8176ef2-7a3b-4c7e-860a-450ba677412a
## 🧪 Test suite
```
↳ Observability Log Explorer
↳ Header menu
↳ should inject the app header menu on the top navbar
↳ Discover fallback link
↳ should render a button link
↳ should navigate to discover keeping the current columns/filters/query/time/data view
```
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>