Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Logs UI] Multi-value fields only render the first value in the log stream and details flyout #79838

Closed
weltenwort opened this issue Oct 7, 2020 · 1 comment · Fixed by #81385
Assignees
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

Comments

@weltenwort
Copy link
Member

weltenwort commented Oct 7, 2020

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 the field parameter. In order to avoid changing the API the field 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:

  1. Which representation to choose in the HTTP API when transferring the log entries to the browser?
  2. How to render the field values in the stream and in the log entry detail flyout?

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:

  1. Fully flatten all object hierarchies, thereby disregarding the semantics of the mapping.
  2. Partially flatten the object hierarchy depending on the mapping type (i.e. treat object and nested 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

@weltenwort weltenwort added 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 labels Oct 7, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@weltenwort weltenwort added the bug Fixes for quality problems that affect the customer experience label Oct 7, 2020
@weltenwort weltenwort self-assigned this Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants