Bug 1250897 - Add build number data in Telemetry pings
MozReview-Commit-ID: 2CB5CMGQN6G
--- a/toolkit/components/telemetry/TelemetryController.jsm
+++ b/toolkit/components/telemetry/TelemetryController.jsm
@@ -376,16 +376,17 @@ var Impl = {
this._log.trace("_getApplicationSection - Unable to get update channel.", e);
}
return {
architecture: arch,
buildId: Services.appinfo.appBuildID,
name: Services.appinfo.name,
version: Services.appinfo.version,
+ displayVersion: AppConstants.MOZ_APP_VERSION_DISPLAY,
vendor: Services.appinfo.vendor,
platformVersion: Services.appinfo.platformVersion,
xpcomAbi: Services.appinfo.XPCOMABI,
channel: updateChannel,
};
},
/**
--- a/toolkit/components/telemetry/docs/common-ping.rst
+++ b/toolkit/components/telemetry/docs/common-ping.rst
@@ -22,16 +22,17 @@ Structure::
creationDate: <ISO date>, // the date the ping was generated
version: <number>, // the version of the ping format, currently 4
application: {
architecture: <string>, // build architecture, e.g. x86
buildId: <string>, // "20141126041045"
name: <string>, // "Firefox"
version: <string>, // "35.0"
+ displayVersion: <string>, // "35.0b3"
vendor: <string>, // "Mozilla"
platformVersion: <string>, // "35.0"
xpcomAbi: <string>, // e.g. "x86-msvc"
channel: <string>, // "beta"
},
clientId: <UUID>, // optional
environment: { ... }, // optional, not all pings contain the environment
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryController.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryController.js
@@ -53,16 +53,17 @@ function checkPingFormat(aPing, aType, a
const MANDATORY_PING_FIELDS = [
"type", "id", "creationDate", "version", "application", "payload"
];
const APPLICATION_TEST_DATA = {
buildId: "2007010101",
name: APP_NAME,
version: APP_VERSION,
+ displayVersion: AppConstants.MOZ_APP_VERSION_DISPLAY,
vendor: "Mozilla",
platformVersion: PLATFORM_VERSION,
xpcomAbi: "noarch-spidermonkey",
};
// Check that the ping contains all the mandatory fields.
for (let f of MANDATORY_PING_FIELDS) {
Assert.ok(f in aPing, f + " must be available.");