Fields with enabled time_series_dimension don't support multi values in non tsdb index modes #112232
Labels
:StorageEngine/Mapping
The storage related side of mappings
:StorageEngine/TSDB
You know, for Metrics
Team:StorageEngine
For OTel mappings, we're using a common definition of attributes and resource attributes for logs, metrics, and traces to avoid duplications and ensure a consistent mapping:
elasticsearch/x-pack/plugin/otel-data/src/main/resources/component-templates/[email protected]
Lines 20 to 24 in 73c5c1e
elasticsearch/x-pack/plugin/otel-data/src/main/resources/component-templates/[email protected]
Lines 9 to 15 in 73c5c1e
That's why we set
time_series_dimension
totrue
which I had expected to only kick in for TSDB data streams and ignored for others. However, it seems like a validation gets kicked in which disallows attributes to have multiple values (due to #110387), even in standard and logsdb index modes. As a result, this exception is thrown:elasticsearch/server/src/main/java/org/elasticsearch/index/mapper/DocumentDimensions.java
Line 103 in 73c5c1e
I think the reason for that is that even for
IndexMode.STANDARD
, we return an implementation ofDocumentDimensions
that only allows single values:elasticsearch/server/src/main/java/org/elasticsearch/index/IndexMode.java
Lines 107 to 109 in 73c5c1e
Maybe we should return a noop implementation for index modes standard and tsdb? Or silently ignore
time_series_dimension
when the index mode is nottsdb
.We can also discuss other options for how we can compose our mappings so that multi-valued attributes are allowed for logs and traces while ensure consistency across the mappings and not having to duplicate mappings (in particular the ECS alias mappings, which are quite long)
cc @elastic/obs-ds-intake-services @gregkalapos
The text was updated successfully, but these errors were encountered: