author | Gabriele Svelto <gsvelto@mozilla.com> |
Wed, 11 Apr 2018 21:29:14 +0200 | |
changeset 412965 | 48f24f61c8b662bf2cbba2e180ed6169f3234437 |
parent 412964 | 679b1667e2ebd0956048f993cce5638f8c914817 |
child 412966 | e4e3e42d46838df5d0702d2eab6273449902ee98 |
push id | 33828 |
push user | archaeopteryx@coole-files.de |
push date | Thu, 12 Apr 2018 19:19:41 +0000 |
treeherder | mozilla-central@6e22c4a726c2 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jchen |
bugs | 1453238 |
milestone | 61.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
mobile/android/base/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetryCrashPingBuilder.java | file | annotate | diff | comparison | revisions |
--- a/mobile/android/base/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetryCrashPingBuilder.java +++ b/mobile/android/base/java/org/mozilla/gecko/telemetry/pingbuilders/TelemetryCrashPingBuilder.java @@ -75,36 +75,41 @@ public class TelemetryCrashPingBuilder e payload.put("id", docID); payload.put("version", TelemetryPingBuilder.UNIFIED_TELEMETRY_VERSION); payload.put("creationDate", currentDate(ISO8601_DATE_HOURS)); payload.put("clientId", clientId); // Parse the telemetry environment and extract relevant fields from it ExtendedJSONObject env = null; String architecture = null; + String displayVersion = null; + String platformVersion = null; String xpcomAbi = null; try { env = new ExtendedJSONObject(annotations.get("TelemetryEnvironment")); final ExtendedJSONObject build = env.getObject("build"); if (build != null) { architecture = build.getString("architecture"); + displayVersion = build.getString("displayVersion"); + platformVersion = build.getString("platformVersion"); xpcomAbi = build.getString("xpcomAbi"); } } catch (NonObjectJSONException | IOException e) { Log.w(LOGTAG, "Couldn't parse the telemetry environment, the ping will be incomplete"); } if (env != null) { payload.put("environment", env); } payload.put("payload", createPayloadNode(crashId, annotations)); - payload.put("application", createApplicationNode(annotations, architecture, xpcomAbi)); + payload.put("application", + createApplicationNode(annotations, architecture, displayVersion, platformVersion, xpcomAbi)); } /** * Return the current date as a string in the specified format. * * @param format The date format, the following constants are provided: * ISO8601_DATE - the ISO 8601 date format, YYYY-MM-DD * ISO8601_DATE_HOURS - the ISO 8601 full date format, YYYY-MM-DDTHH:00:00.000Z @@ -175,25 +180,26 @@ public class TelemetryCrashPingBuilder e * crashed application. * * @param annotations A map holding the crash annotations * @param architecture The platform architecture * @param xpcomAbi The XPCOM ABI version * @returns A JSON object representing the ping's application node */ private static ExtendedJSONObject createApplicationNode(HashMap<String, String> annotations, - String architecture, String xpcomAbi) { + String architecture, String displayVersion, + String platformVersion, String xpcomAbi) { ExtendedJSONObject node = new ExtendedJSONObject(); final String version = annotations.get("Version"); node.put("vendor", annotations.get("Vendor")); node.put("name", annotations.get("ProductName")); node.put("buildId", annotations.get("BuildID")); - node.put("displayVersion", version); - node.put("platformVersion", version); + node.put("displayVersion", displayVersion); + node.put("platformVersion", platformVersion); node.put("version", version); node.put("channel", annotations.get("ReleaseChannel")); if (architecture != null) { node.put("architecture", architecture); } if (xpcomAbi != null) {