Merge f9ca780dd3
into a44bf21582
This commit is contained in:
commit
345b4b5c50
1 changed files with 8 additions and 7 deletions
|
@ -6,6 +6,9 @@ const { storage } = require('sdk/simple-storage');
|
||||||
const {
|
const {
|
||||||
TelemetryController
|
TelemetryController
|
||||||
} = require('resource://gre/modules/TelemetryController.jsm');
|
} = require('resource://gre/modules/TelemetryController.jsm');
|
||||||
|
const {
|
||||||
|
TelemetryEnvironment
|
||||||
|
} = require ('resource://gre/modules/TelemetryEnvironment.jsm');
|
||||||
const { Request } = require('sdk/request');
|
const { Request } = require('sdk/request');
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,9 +47,7 @@ function experimentPing(event) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: DRY up this ping centre code here and in lib/Telemetry.
|
// TODO: DRY up this ping centre code here and in lib/Telemetry.
|
||||||
const pcPing = TelemetryController.getCurrentPingData();
|
const environment = TelemetryEnvironment.currentEnvironment;
|
||||||
pcPing.type = 'testpilot';
|
|
||||||
pcPing.payload = payload;
|
|
||||||
const pcPayload = {
|
const pcPayload = {
|
||||||
// 'method' is used by testpilot-metrics library.
|
// 'method' is used by testpilot-metrics library.
|
||||||
// 'event' was used before that library existed.
|
// 'event' was used before that library existed.
|
||||||
|
@ -54,10 +55,10 @@ function experimentPing(event) {
|
||||||
client_time: makeTimestamp(parsed.timestamp || timestamp),
|
client_time: makeTimestamp(parsed.timestamp || timestamp),
|
||||||
addon_id: subject,
|
addon_id: subject,
|
||||||
addon_version: addon.version,
|
addon_version: addon.version,
|
||||||
firefox_version: pcPing.environment.build.version,
|
firefox_version: environment.build.version,
|
||||||
os_name: pcPing.environment.system.os.name,
|
os_name: environment.system.os.name,
|
||||||
os_version: pcPing.environment.system.os.version,
|
os_version: environment.system.os.version,
|
||||||
locale: pcPing.environment.settings.locale,
|
locale: environment.settings.locale,
|
||||||
// Note: these two keys are normally inserted by the ping-centre client.
|
// Note: these two keys are normally inserted by the ping-centre client.
|
||||||
client_id: ClientID.getCachedClientID(),
|
client_id: ClientID.getCachedClientID(),
|
||||||
topic: 'testpilot'
|
topic: 'testpilot'
|
||||||
|
|
Loading…
Add table
Reference in a new issue