From 9732b3c531e64b3fdd990abae6a0fcfe83cfa2b4 Mon Sep 17 00:00:00 2001 From: Felix Barnsteiner Date: Wed, 8 Jan 2025 14:07:31 +0100 Subject: [PATCH] Optimized index sorting for OTel logs (#119504) (#119746) (cherry picked from commit afda404524d1944cc78a1d0de6ab0903c10c7326) --- docs/changelog/119504.yaml | 5 +++++ .../resources/component-templates/logs-otel@mappings.yaml | 1 + 2 files changed, 6 insertions(+) create mode 100644 docs/changelog/119504.yaml diff --git a/docs/changelog/119504.yaml b/docs/changelog/119504.yaml new file mode 100644 index 0000000000000..f63e422face10 --- /dev/null +++ b/docs/changelog/119504.yaml @@ -0,0 +1,5 @@ +pr: 119504 +summary: Optimized index sorting for OTel logs +area: Data streams +type: enhancement +issues: [] diff --git a/x-pack/plugin/otel-data/src/main/resources/component-templates/logs-otel@mappings.yaml b/x-pack/plugin/otel-data/src/main/resources/component-templates/logs-otel@mappings.yaml index 9f19e2e04d2ca..9c47cfad993e2 100644 --- a/x-pack/plugin/otel-data/src/main/resources/component-templates/logs-otel@mappings.yaml +++ b/x-pack/plugin/otel-data/src/main/resources/component-templates/logs-otel@mappings.yaml @@ -9,6 +9,7 @@ template: mode: logsdb sort: field: [ "resource.attributes.host.name", "@timestamp" ] + order: [ "asc", "desc" ] mappings: properties: attributes: