Skip to content

Commit

Permalink
Separate app name and version in alert payload (close #13)
Browse files Browse the repository at this point in the history
  • Loading branch information
pondzix committed Dec 21, 2023
1 parent d149bd6 commit f20a8b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,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
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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",
Expand Down

0 comments on commit f20a8b8

Please sign in to comment.