From 1c5e9e31ec7dfe25d28321123650d21325d75b1d Mon Sep 17 00:00:00 2001 From: Dario Gieselaar Date: Wed, 2 Sep 2020 14:15:32 +0200 Subject: [PATCH] Correct structure for environment properties --- .../__snapshots__/apm_telemetry.test.ts.snap | 20 ++++++++++--------- x-pack/plugins/apm/common/apm_telemetry.ts | 8 +++++--- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap b/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap index d808be0fa83ced..e9763082a3999f 100644 --- a/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap +++ b/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap @@ -571,15 +571,17 @@ exports[`APM telemetry helpers getApmTelemetry generates a JSON object with the } }, "environments": { - "services_without_environment": { - "type": "long" - }, - "services_with_multiple_environments": { - "type": "long" - }, - "top_enviroments": { - "type": "keyword", - "ignore_above": 1024 + "properties": { + "services_without_environment": { + "type": "long" + }, + "services_with_multiple_environments": { + "type": "long" + }, + "top_enviroments": { + "type": "keyword", + "ignore_above": 1024 + } } }, "cloud": { diff --git a/x-pack/plugins/apm/common/apm_telemetry.ts b/x-pack/plugins/apm/common/apm_telemetry.ts index 13624edafc8a2d..3e885f4948c1e4 100644 --- a/x-pack/plugins/apm/common/apm_telemetry.ts +++ b/x-pack/plugins/apm/common/apm_telemetry.ts @@ -107,9 +107,11 @@ export function getApmTelemetryMapping() { }, }, environments: { - services_without_environment: long, - services_with_multiple_environments: long, - top_enviroments: keyword, + properties: { + services_without_environment: long, + services_with_multiple_environments: long, + top_enviroments: keyword, + }, }, cloud: { properties: {