From 6e0463c981a222f3d540793c21597e6125d4bbc7 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Wed, 5 Jun 2019 17:34:33 -0700 Subject: [PATCH] cobra_to_sentry / add tags --- ws/IXSentryClient.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/ws/IXSentryClient.cpp b/ws/IXSentryClient.cpp index 11334e56..7dc8f02e 100644 --- a/ws/IXSentryClient.cpp +++ b/ws/IXSentryClient.cpp @@ -132,8 +132,34 @@ namespace ix Json::Value extra; extra["cobra_event"] = msg; + extra["cobra_event"] = msg; - exception["extra"] = extra; + // + // "tags": [ + // [ + // "a", + // "b" + // ], + // ] + // + Json::Value tags; + + Json::Value gameTag; + gameTag.append("game"); + gameTag.append(msg["device"]["game"]); + tags.append(gameTag); + + Json::Value userIdTag; + userIdTag.append("userid"); + userIdTag.append(msg["device"]["user_id"]); + tags.append(userIdTag); + + Json::Value environmentTag; + environmentTag.append("environment"); + environmentTag.append(msg["device"]["environment"]); + tags.append(environmentTag); + + payload["tags"] = tags; return _jsonWriter.write(payload); }