From 1b22c131986f7fd471d127285c34505988e2c246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Poniedzia=C5=82ek?= Date: Thu, 21 Dec 2023 11:11:08 +0100 Subject: [PATCH] Separate app name and version in alert payload (close #13) --- .../scala/com.snowplowanalytics.snowplow.snowflake/Alert.scala | 3 ++- .../com.snowplowanalytics.snowplow.snowflake/AlertSpec.scala | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/core/src/main/scala/com.snowplowanalytics.snowplow.snowflake/Alert.scala b/modules/core/src/main/scala/com.snowplowanalytics.snowplow.snowflake/Alert.scala index b2ede96..42f7b1e 100644 --- a/modules/core/src/main/scala/com.snowplowanalytics.snowplow.snowflake/Alert.scala +++ b/modules/core/src/main/scala/com.snowplowanalytics.snowplow.snowflake/Alert.scala @@ -38,7 +38,8 @@ object Alert { SelfDescribingData( schema = SchemaKey("com.snowplowanalytics.monitoring.loader", "alert", "jsonschema", SchemaVer.Full(1, 0, 0)), data = Json.obj( - "application" -> s"${appInfo.name}-${appInfo.version}".asJson, + "appName" -> appInfo.name.asJson, + "appVersion" -> appInfo.version.asJson, "message" -> getMessage(alert).asJson, "tags" -> tags.asJson ) diff --git a/modules/core/src/test/scala/com.snowplowanalytics.snowplow.snowflake/AlertSpec.scala b/modules/core/src/test/scala/com.snowplowanalytics.snowplow.snowflake/AlertSpec.scala index 670d1d4..5efceb0 100644 --- a/modules/core/src/test/scala/com.snowplowanalytics.snowplow.snowflake/AlertSpec.scala +++ b/modules/core/src/test/scala/com.snowplowanalytics.snowplow.snowflake/AlertSpec.scala @@ -46,7 +46,8 @@ class AlertSpec extends Specification { |{ | "schema" : "iglu:com.snowplowanalytics.monitoring.loader/alert/jsonschema/1-0-0", | "data" : { - | "application" : "testApp-testVersion", + | "appName" : "testApp", + | "appVersion": "testVersion", | "message" : "$message", | "tags" : { | "testTag1" : "testValue1",