[Logs UI] Multi-value fields only render the first value in the log stream and details flyout #79838
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Logs UI
Logs UI feature
Team:Infra Monitoring UI - DEPRECATED
DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Problem description
Since #76919 migrated the data fetching to using the
field
parameter, the APIs for log stream entries as well as for the log entry details flyout only return the first value and drops any value beyond that.Background
Previously, the values were read from the
_source
of a document, which left no room for ambiguity about whether a value is a single value or an array of values. Internally, though, Elasticsearch treats all fields as multi-value fields, even if the value array only contains one item. This is mirrored in the response obtained via thefield
parameter. In order to avoid changing the API thefield
refactoring in #76919 always extracts the first value of the field value array from the ES response. This leads to correct results for single-value fields, but ignores every value beyond the first for multi-value fields.Possible solutions
The correct ™️ handling of single or multiple values depends on the type of the field in the mapping. For the purposes of solving this issue, it could be decomposed into two separate problems:
The first problem should be easily solvable by exposing the underlying ES field semantics through the log entry API and therefore always sending an array of values.
The solution for the second problem must include a visual representation of the field values that looks reasonable for value arrays of a length of one as well as higher lengths.
Special care needs to be taken for values of "compound" fields types such as
object
,nested
,flattened
,Geo-point
,Geo-shape
and so on. An unsolved question so far is the flattening algorithm applied, which could broadly be one of:object
andnested
types differently).There is a related discussion taking place as part of the "Fields" project. And ultimately the Logs UI should probably follow the consensus once it is achieved.
Related links
The text was updated successfully, but these errors were encountered: