[DataView] Enrich data view field data by ECS information (when available) #182361
Labels
Feature:Data Views
Data Views code and UI - index patterns before 8.0
Team:DataDiscovery
Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph)
Projects
Description
This is a follow up of a POC evaluation (#180543) enriching data view field data by ECS information if requested. First we tried to add ECS information on Browser side, but this would add up to our bundle size, so we evaluated the approach to use the Kibana server to enrich field data provided by Elasticsearch. This approach has no impact to browser bundle size
Adding ECS field information to data view fields provides a great way to show more information to the user (description), help with prioritization, allow us to gain insights (Telemetry about ECS usage). This issue is focusing on extending the API for this purpose, out of scope is the consumption.
Extension of DataViews: _field_for_wildcard endpoint
So the current
FIELDS_FOR_WILDCARD_PATH
,/internal/data_views/_fields_for_wildcard
, should provide functionality to return ECS information, if requested.Those are the parameters we currently use
Server
kibana/src/plugins/data_views/server/rest_api_routes/internal/fields_for.ts
Lines 49 to 60 in ed29b97
Browser
kibana/src/plugins/data_views/server/fetcher/lib/es_api.ts
Lines 43 to 52 in ed29b97
I therefore should offer a new parameter
includeEcsMeta
(Browser) andinclude
, which can be used in the following waysincludeEcsMeta
is not set, nothing happens, everything works like beforeincludeEcsMeta
is set toall
, all available ECS data for a given field should be returnedincludeEcsMeta
is set to a comma separated array, liketype, description,...
the ECS fields matching this list should be returnedHere is an example of ECS meta information which can be added to a field returned by the endpoint:
Here is what should be returned when includeEcsMeta=all and a field name matches an ECS name
Here is what should be returned when includeEcsMeta=short,description and a field name matches an ECS name
This is provided by the
@elastic/ecs
package (https://github.com/elastic/ecs-typescript), more information about ECS https://www.elastic.co/guide/en/ecs/master/ecs-reference.htmlConsumption
This API extension allows us to make use of ECS meta data in a flexible way, a few examples.
Showing ECS descriptions on demand
For this just a single field should be requested when it should be displayed, and just the description information would be needed.
Prioritize fields based on ecs information
#181036
Improved telemetry
We could gain more insights about the usage of ECS fields
The text was updated successfully, but these errors were encountered: