Commit graph

10 commits

Author SHA1 Message Date
Marco Antonio Ghiani
ea26816ac9
[Infrastructure UI] Add TelemetryService documentation (#151641)
## 📓 Summary

Closes #150977 

This documentation helps to better understand how we can define and
trigger custom events in the infra plugin using a centralized service
that is injected into the Kibana context for the easiest consumption.

It includes documentation for:
- Quick overview of the `TelemetryService`
- How to define custom events with TelemetryService
- Examples of using custom events in the plugin

It also includes some minor changes to the definition of the
TelemetryService types.

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-02-23 11:09:25 +01:00
Kerry Gallagher
8583231046
[Logs UI] Refactor Time and Position log stream state (#149052)
## Summary

Closes https://github.com/elastic/kibana/issues/145137

Initially this issue was just going to include moving the time context
into the query state machine. However, this actually made working with
the dependant log position code a lot harder. As such the log position
code has also been moved to it's own state machine.

## 🕵️‍♀️ Reviewer hints and notable changes

- There are some comments left inline (*previous logic* notes might be
useful)

- There is now a new machine for dealing with Log Position state (target
position, latest position, visible positions).

- Time based context (time range, timestamps, refresh interval) is now
moved to the query machine (this will also make dealing with saved
queries easier).

- The page state machine is the only machine that the UI interacts with
(either reading context or sending events). The page state machine
co-ordinates forwarding necessary events to other internal machines.

- Ensure relevant notifications reach their targets, e.g. when time is
changed, positions should also update.

- [There is some documentation regarding URL state and
precedence](f9ca0f795c).

- `updateContextInUrl` now always sets the full URL-relevant context in
the URL when called (since the `urlStateStorage.set()` call replaces the
whole key).

- Within the Log Stream Query state machine the `initialized` state node
is now modelled as a parallel state node, this is so `query` and `time`
can act independently (time needs to handle things like the refresh
interval, for example).

## 🕹 Testing

(Just some ideas)

- Can the time range be changed?
- Can the refresh interval be changed?
- Is state synchronised to the URL and to relevant Kibana services (time
filter service etc)?
- When streaming is enabled, are requests dispatched correctly on an
interval?
- Do positions update correctly whilst interacting with the stream?
(scrolling etc)
- Does the backwards compatibility of initialising from the URL work?

## 🎨 State machine diagrams

### Log stream page

![Screenshot 2023-02-06 at 15 29
27](https://user-images.githubusercontent.com/471693/217014687-1e1b6ae4-a7b5-4e3c-930f-5d9cf7406453.png)

### Log stream query

![Screenshot 2023-02-06 at 15 31
38](https://user-images.githubusercontent.com/471693/217014757-7c6b1788-65a2-460e-abb6-a1f9fee1131a.png)

### Log stream position

![Screenshot 2023-02-06 at 15 30
36](https://user-images.githubusercontent.com/471693/217014809-017a4b23-9a4a-4784-8ac3-36cbbecfd72e.png)

## ⚠️ Warnings

- [There is a known bug with
streaming](https://github.com/elastic/kibana/issues/136159#issuecomment-1408902137).
- [There is a known issue with a console
error](https://github.com/elastic/kibana/pull/149052#issuecomment-1420579941)

---------

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2023-02-21 13:10:59 +00:00
Felix Stürmer
46d689220b
[Logs UI] Refactor log stream query state (#146884)
Co-authored-by: Kerry Gallagher <kerry.gallagher@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
closes https://github.com/elastic/kibana/issues/145133
closes https://github.com/elastic/kibana/issues/142764
2023-01-03 19:28:50 +01:00
Felix Stürmer
eb75937130
[Logs UI] Implement log stream page state as a state machine (#145234)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kerry Gallagher <kerry.gallagher@elastic.co>
closes https://github.com/elastic/kibana/issues/145131
2022-12-13 17:50:36 +01:00
Felix Stürmer
b6dcb8b088
[Infra UI] Remove outdated docs and scripts (#146066) 2022-11-23 12:35:08 +01:00
Chris Cowan
cf846bdddf
[Metrics UI][Logs UI] Completely remove GraphQL and Apollo (#89036) 2021-02-02 16:56:40 -07:00
Kerry Gallagher
0a6c748cc8
[Logs / Metrics] New Platform migration (full cutover) (#54583)
* Fully migrates metrics and logs to the NP

Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2020-02-18 19:22:27 +00:00
Court Ewing
7ac8e4d9cc Move x-pack plugins/server/common to x-pack/legacy 2019-06-20 13:34:48 -04:00
Sonja Krause-Harder
7de81920f7
[Infra UI] Add Docker / Metricbeat / Nginx guide (#32898)
* Add Docker / Metricbeat / Nginx guide

* Clarify that metricsets need to be enabled.
2019-03-15 09:26:55 +01:00
Felix Stürmer
36caa6badd
[Infra UI] Merge InfraOps feature branch (#24068) 2018-10-17 12:07:50 +02:00