From 3b78fbc41454a461174b270c106822b1ec20fdad Mon Sep 17 00:00:00 2001 From: Frank Bertsch Date: Tue, 5 May 2020 11:05:04 -0400 Subject: [PATCH 1/3] Bug 1635152 - Fennec Installation ping --- .../installation/installation.1.schema.json | 95 +++++++++++++++++++ .../installation/installation.1.schema.json | 76 +++++++++++++++ .../telemetry/installation.1.sample.pass.json | 20 ++++ 3 files changed, 191 insertions(+) create mode 100644 schemas/telemetry/installation/installation.1.schema.json create mode 100644 templates/telemetry/installation/installation.1.schema.json create mode 100644 validation/telemetry/installation.1.sample.pass.json diff --git a/schemas/telemetry/installation/installation.1.schema.json b/schemas/telemetry/installation/installation.1.schema.json new file mode 100644 index 000000000..815ab3305 --- /dev/null +++ b/schemas/telemetry/installation/installation.1.schema.json @@ -0,0 +1,95 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "properties": { + "adgroup": { + "description": "Adjust AdGroup", + "type": [ + "string", + "null" + ] + }, + "app_name": { + "type": "string" + }, + "arch": { + "description": "device architecture", + "type": "string" + }, + "campaign": { + "description": "Adjust campaign", + "type": [ + "string", + "null" + ] + }, + "channel": { + "type": "string" + }, + "client_id": { + "description": "telemetry client_id", + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", + "type": "string" + }, + "created": { + "type": "string" + }, + "creative": { + "description": "Adjust creative", + "type": [ + "string", + "null" + ] + }, + "device_id": { + "description": "hashed Google Ad ID", + "type": [ + "string", + "null" + ] + }, + "locale": { + "description": "application locale, such as 'en-US'", + "type": "string" + }, + "manufacturer": { + "description": "Build.MANUFACTURER", + "type": "string" + }, + "model": { + "description": "Build.MODEL", + "type": "string" + }, + "network": { + "description": "Adjust network", + "type": [ + "string", + "null" + ] + }, + "os": { + "type": "string" + }, + "osversion": { + "type": "string" + }, + "profile_date": { + "type": "integer" + }, + "seq": { + "description": "0-indexed sequence number", + "minimum": 0, + "type": "integer" + }, + "tz": { + "description": "timezone offset in minutes from UTC", + "type": "integer" + } + }, + "required": [ + "client_id", + "app_name", + "channel" + ], + "title": "installation", + "type": "object" +} diff --git a/templates/telemetry/installation/installation.1.schema.json b/templates/telemetry/installation/installation.1.schema.json new file mode 100644 index 000000000..990d9c10f --- /dev/null +++ b/templates/telemetry/installation/installation.1.schema.json @@ -0,0 +1,76 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "title": "installation", + "properties": { + "device_id": { + "type": ["string", "null"], + "description": "hashed Google Ad ID" + }, + "client_id": { + "type": "string", + @COMMON_PATTERN_UUID_1_JSON@, + "description": "telemetry client_id" + }, + "seq": { + "type": "integer", + "minimum": 0, + "description": "0-indexed sequence number" + }, + "locale": { + "type": "string", + "description": "application locale, such as 'en-US'" + }, + "os": { + "type": "string" + }, + "osversion": { + "type": "string" + }, + "manufacturer": { + "type": "string", + "description": "Build.MANUFACTURER" + }, + "model": { + "type": "string", + "description": "Build.MODEL" + }, + "arch": { + "type": "string", + "description": "device architecture" + }, + "profile_date": { + "type": "integer" + }, + "created": { + "type": "string" + }, + "tz": { + "type": "integer", + "description": "timezone offset in minutes from UTC" + }, + "app_name": { + "type": "string" + }, + "channel": { + "type": "string" + }, + "campaign": { + "type": ["string", "null"], + "description": "Adjust campaign" + }, + "adgroup": { + "type": ["string", "null"], + "description": "Adjust AdGroup" + }, + "creative": { + "type": ["string", "null"], + "description": "Adjust creative" + }, + "network": { + "type": ["string", "null"], + "description": "Adjust network" + } + }, + "required": [ "client_id", "app_name", "channel" ] +} diff --git a/validation/telemetry/installation.1.sample.pass.json b/validation/telemetry/installation.1.sample.pass.json new file mode 100644 index 000000000..887d7b76a --- /dev/null +++ b/validation/telemetry/installation.1.sample.pass.json @@ -0,0 +1,20 @@ +{ + "device_id": "abcdefghijklmnop", + "client_id": "6763e028-d9b2-49a9-b221-a82d62465322", + "seq": 0, + "locale" : "en-US", + "os" : "Android", + "osversion" : "23", + "manufacturer": "Google", + "model": "Pixel 3", + "arch": "arm64", + "profile_date": 25754000, + "created" : "2020-05-01", + "tz" : -240, + "app_name": "Fennec", + "channel": "release", + "campaign": "camp1", + "adgroup": "adgroup1", + "creative": "creative1", + "network": "network1" +} From cd55128fb4b67e8b21931d57a6f79b82637bab84 Mon Sep 17 00:00:00 2001 From: Frank Bertsch Date: Tue, 5 May 2020 11:15:17 -0400 Subject: [PATCH 2/3] Add reason field to installation ping --- schemas/telemetry/installation/installation.1.schema.json | 3 +++ templates/telemetry/installation/installation.1.schema.json | 3 +++ validation/telemetry/installation.1.sample.pass.json | 1 + 3 files changed, 7 insertions(+) diff --git a/schemas/telemetry/installation/installation.1.schema.json b/schemas/telemetry/installation/installation.1.schema.json index 815ab3305..251f061f4 100644 --- a/schemas/telemetry/installation/installation.1.schema.json +++ b/schemas/telemetry/installation/installation.1.schema.json @@ -75,6 +75,9 @@ "profile_date": { "type": "integer" }, + "reason": { + "type": "string" + }, "seq": { "description": "0-indexed sequence number", "minimum": 0, diff --git a/templates/telemetry/installation/installation.1.schema.json b/templates/telemetry/installation/installation.1.schema.json index 990d9c10f..c84b23c93 100644 --- a/templates/telemetry/installation/installation.1.schema.json +++ b/templates/telemetry/installation/installation.1.schema.json @@ -17,6 +17,9 @@ "minimum": 0, "description": "0-indexed sequence number" }, + "reason": { + "type": "string" + }, "locale": { "type": "string", "description": "application locale, such as 'en-US'" diff --git a/validation/telemetry/installation.1.sample.pass.json b/validation/telemetry/installation.1.sample.pass.json index 887d7b76a..6b4253578 100644 --- a/validation/telemetry/installation.1.sample.pass.json +++ b/validation/telemetry/installation.1.sample.pass.json @@ -2,6 +2,7 @@ "device_id": "abcdefghijklmnop", "client_id": "6763e028-d9b2-49a9-b221-a82d62465322", "seq": 0, + "reason": "adjust-available", "locale" : "en-US", "os" : "Android", "osversion" : "23", From 8debfbb5c0b42d6bbce93b5884c134f3845c8639 Mon Sep 17 00:00:00 2001 From: Frank Bertsch Date: Thu, 7 May 2020 11:23:44 -0400 Subject: [PATCH 3/3] Add description for profile_date --- schemas/telemetry/installation/installation.1.schema.json | 1 + templates/telemetry/installation/installation.1.schema.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/schemas/telemetry/installation/installation.1.schema.json b/schemas/telemetry/installation/installation.1.schema.json index 251f061f4..142ca58ad 100644 --- a/schemas/telemetry/installation/installation.1.schema.json +++ b/schemas/telemetry/installation/installation.1.schema.json @@ -73,6 +73,7 @@ "type": "string" }, "profile_date": { + "description": "Number of days since the epoch that the profile was created", "type": "integer" }, "reason": { diff --git a/templates/telemetry/installation/installation.1.schema.json b/templates/telemetry/installation/installation.1.schema.json index c84b23c93..f2550d71b 100644 --- a/templates/telemetry/installation/installation.1.schema.json +++ b/templates/telemetry/installation/installation.1.schema.json @@ -43,7 +43,8 @@ "description": "device architecture" }, "profile_date": { - "type": "integer" + "type": "integer", + "description": "Number of days since the epoch that the profile was created" }, "created": { "type": "string"