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

LogsDB - Ignore dimension fields #112239

Closed
salvatore-campagna opened this issue Aug 27, 2024 · 1 comment · Fixed by #112345
Closed

LogsDB - Ignore dimension fields #112239

salvatore-campagna opened this issue Aug 27, 2024 · 1 comment · Fixed by #112345

Comments

@salvatore-campagna
Copy link
Contributor

salvatore-campagna commented Aug 27, 2024

Description

Multiple field types support the dimension boolean parameter after the introduction of TSDB (dimensions used for routing purposes). There are integrations sharing component and composable templates and creating index templates, with field mappings that are shared in case a filed is used both for metrics and logging integrations. As a result, it is possible that a mapping defining dimension: true on a field is used when index mode is standard, time_series or logsdb. We do not want to prevent this sharing to happen because that would lead to many more composable/component/index templates to maintain for integrations. As a result, the idea is to just ignore the dimension parameter when not applicable (index.mode != time_series`).

This happens specifically with Otel mappings, which use shared mappings for logs and metrics which means some fields are declared as dimensions just because those fields are also used when the index mode is time_series. Because of this, anyway, multi-valued dimension fields trigger a validation error when index mode is logsdb (and standard). Multi-valued fields being disallowed should only happen in the context of metrics anyway. See #112232

We have different options to fix this:

  • ignore the dimension attribute in mappers when index mode is not time_series (doing this is a bit painful for every mapper, the suggestion is to extract common behaviour in a parent class).
  • always return empty dimensions when index mode is not time_series

NOTE: this can cause integrations to break when moving to LogsDB in case multi-value attributes are written.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants