kibana/docs/developer
Marco Antonio Ghiani abe58cb011
[Logs Shared] Move LogStream and LogView into new shared plugin (#161151)
## 📓 Summary

Closes #159128 

Due to a dependencies issue when disabling a plugin in serverless mode,
the LogStream feature and related logic were disabled for every
consumer.

We decided to split this shared component and endpoint into their own
plugin of shared logs utilities, reducing to the minimum the required
dependency that could disable the plugin.

What we moved can be summarized with:
- `infrastructure-monitoring-log-view` saved object definition and
registration
- LogViews server/client services (exposed with start contract) +
related endpoints
- LogEntries server service + related endpoints
- LogEntriesDomain logic (exposed with start contract)
- `<LogStream />` component
- `<ScrollableLogTextStreamView />` component and related logic
- LogView state machine
- Containers/Hooks to consume the moved APIs.
- Common types/utils definition, now exported and consumed as a
dependency from the `infra` plugin.

## 🤓 Review hints

Most of the changes are just renaming and moving stuff into the new
plugin, but for some operations was required to implement new logic,
which may deserve a more critical review:
- server/public `plugin.ts` files for the `infra` and `logs_shared`
plugins. The new plugin now registers the fallback actions to retrieve a
source configuration if there's no stored log view. It also set the
configuration for the message field and registers the log view saved
object.
- the `logEntriesDomain` has also been moved inside the new plugin, but
is also used by the logs-analysis endpoints, so it is exposed by the
logs_shared plugin and consumed by `infra`.

## 👣 Following steps

We currently are still using the `observability` plugin for consuming
the CoPilot feature on our LogsStream flyout.
The plugin dependency is marked as optional, so disabling the
`observability` plugin in a serverless environment won't disable also
the exposed features in this new plugin, but it'll affect only the
CoPilot feature, which won't be loaded.

In future, would be nice to extract the CoPilot feature into its own
package/plugin, so that also serverless projects can consume it without
depending on `observability.

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-05 10:30:28 +02:00
..
advanced Upgrade Node.js to 16.20.1 (#160177) 2023-06-21 16:57:55 -05:00
architecture Add build_date to kbn:api/status (#157905) 2023-05-25 10:21:47 -07:00
best-practices [Documentation] Fix links to repository files on Best Practices page (#96152) 2022-12-21 14:16:11 -07:00
contributing [DOCS] Remove or move book-scoped attributes (#155210) 2023-04-20 09:12:09 -07:00
getting-started Updating debugging docs: replacing apm.dev.js configuration references with kibana.dev.yml (#152237) 2023-03-08 14:43:34 +00:00
images docs: interpreting ci failures (#153549) 2023-03-24 17:27:11 +01:00
plugin [docs] remove invalid arg from scripts/generate_plugin example (#159466) 2023-06-14 12:07:18 +02:00
index.asciidoc Add more details on developer documentation (#126674) 2022-03-03 11:44:05 -07:00
plugin-list.asciidoc [Logs Shared] Move LogStream and LogView into new shared plugin (#161151) 2023-07-05 10:30:28 +02:00
telemetry.asciidoc [dev/cli/timings] report on time to dev server listening (#95120) 2021-03-24 18:45:24 -04:00