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 authored and istreeter committed Feb 18, 2024
1 parent 8160f68 commit 1b22c13
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 @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 1b22c13

Please sign in to comment.