From 7771d8b6fa449379ff049c5fd1b24c455e4dedb3 Mon Sep 17 00:00:00 2001 From: Rory Hunter Date: Thu, 24 Sep 2020 11:58:53 +0100 Subject: [PATCH] Tweak the ECS fields in DeprecatedMessage (#62855) Backport of #62855. Follow-up to #61484. --- .../xpack/deprecation/DeprecationHttpIT.java | 8 ++++---- .../xpack/deprecation/logging/EcsJsonLayout.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/x-pack/plugin/deprecation/qa/rest/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java b/x-pack/plugin/deprecation/qa/rest/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java index 4f39d2fc86d..4686951a61f 100644 --- a/x-pack/plugin/deprecation/qa/rest/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java +++ b/x-pack/plugin/deprecation/qa/rest/src/javaRestTest/java/org/elasticsearch/xpack/deprecation/DeprecationHttpIT.java @@ -277,8 +277,8 @@ public class DeprecationHttpIT extends ESRestTestCase { hasKey("cluster.name"), hasKey("cluster.uuid"), hasKey("component"), - hasEntry("data_stream.datatype", "deprecation"), - hasEntry("data_stream.namespace", "elasticsearch"), + hasEntry("data_stream.dataset", "deprecation.elasticsearch"), + hasEntry("data_stream.namespace", "default"), hasEntry("data_stream.type", "logs"), hasEntry("ecs.version", "1.6"), hasEntry("key", "deprecated_settings"), @@ -293,8 +293,8 @@ public class DeprecationHttpIT extends ESRestTestCase { hasKey("cluster.name"), hasKey("cluster.uuid"), hasKey("component"), - hasEntry("data_stream.datatype", "deprecation"), - hasEntry("data_stream.namespace", "elasticsearch"), + hasEntry("data_stream.dataset", "deprecation.elasticsearch"), + hasEntry("data_stream.namespace", "default"), hasEntry("data_stream.type", "logs"), hasEntry("ecs.version", "1.6"), hasEntry("key", "deprecated_route"), diff --git a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/logging/EcsJsonLayout.java b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/logging/EcsJsonLayout.java index 8061c9ef9f5..c9930351ca1 100644 --- a/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/logging/EcsJsonLayout.java +++ b/x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/logging/EcsJsonLayout.java @@ -58,8 +58,8 @@ public class EcsJsonLayout extends AbstractStringLayout { map.put("node.name", inQuotes("%node_name")); map.put("message", inQuotes("%notEmpty{%enc{%marker}{JSON} }%enc{%.-10000m}{JSON}")); map.put("data_stream.type", inQuotes("logs")); - map.put("data_stream.datatype", inQuotes("deprecation")); - map.put("data_stream.namespace", inQuotes("elasticsearch")); + map.put("data_stream.dataset", inQuotes("deprecation.elasticsearch")); + map.put("data_stream.namespace", inQuotes("default")); map.put("ecs.version", inQuotes(ECS_VERSION)); for (String key : esMessageFields) {