elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.48k stars 8.05k forks source link

[DataViews] Evaluate switching ML alert rules to make use of DataViewLazy #173996

Open kertal opened 6 months ago

kertal commented 6 months ago

When DataViewLazy is implemented (#167750), ML based alerting rules should be evaluated to consume this new class. The benefit of it is that it's no longer triggering a request for fields (field_caps request to ES) when being initialized. When fields are not needed, this saves a lot of redundant requests to Elasticsearch. At the first sight it seems the DataView service is needed to get the fieldFormatMap. For this the requests for fields should not be necessary:

https://github.com/elastic/kibana/blob/50dabea70ff3df5de077626a7cbc139bbb51600d/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts#L217-L234

elasticmachine commented 6 months ago

Pinging @elastic/ml-ui (:ml)

elasticmachine commented 6 months ago

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

kertal commented 3 months ago

@darnautov this should be unblocked now since DataViewLazy was merged: https://github.com/elastic/kibana/pull/173948