CloudServices/Sync/ReDash: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(fixed typo)
(Add a few more descriptions)
Line 9: Line 9:
| app_build_id || varchar || Firefox build ID (e.g. 20160801085519)
| app_build_id || varchar || Firefox build ID (e.g. 20160801085519)
|-
|-
| app_display_version || varchar || Firefox version (e.g. 50.0a2)
| app_version || varchar || Firefox version (e.g. 50.0a2) - corresponds to the MOZ_APP_VERSION configure value
|-
|-
| app_name || varchar || Platform?
| app_display_version || varchar || The application version as shown in the about dialog. Almost always identical to app_version. Corresponds to the  MOZ_APP_VERSION_DISPLAY configure value.
|-
|-
| app_version || varchar || What's the difference with app_display_version?
| app_name || varchar || Will always be the string "Firefox" in desktop submitted pings.
|-
|-
| uid || varchar || Hashed Sync/FxA ID
| uid || varchar || Hashed Sync/FxA ID
|-
|-
| deviceid || varchar || Browser profile id? Not currently captured.
| deviceid || varchar || Hashed FxA device ID.
|-
|-
| when || bigint || Unix timestamp of when sync occurred. Make sure to put in "quotes" since when is a reserved SQL word.
| when || bigint || Unix timestamp of when sync occurred. Make sure to put in "quotes" since when is a reserved SQL word. Note that because this is taken from the client's clock, the time may be wildly inaccurate.
|-
|-
| took || bigint || Time it took to Sync?
| took || bigint || Number of milli-seconds it took to Sync.
|-
|-
| failurereason || row(name varchar, value varchar) || Sync failure reason
| failurereason || row(name varchar, value varchar) || Sync failure reason, or null if no failure.
|-
|-
| status || row(sync varchar, service varchar) || ??
| status || row(sync varchar, service varchar) || The status of sync after completion, or null is both statuses record success.
|-
|-
| why || varchar || Always null because XYZ and is meant for ABC
| why || varchar || Currently always null, but eventually should be the reason the sync was performed (eg, timer, button press, score update, etc)
|-
|-
| engines || array(row(name varchar, took bigint, status varchar, failureReason row(name varchar, value varchar), incoming row(applied bigint, failed bigint, newFailed bigint, reconciled bigint), outgoing array(row(sent bigint, failed bigint)))) || ??
| engines || array(engine_record) || A record of the engines that synced. Each element of the array is in the format of an [[#Engine Record|engine record]].
|-
|-
| submission_date_s3 || varchar || ??
| submission_date_s3 || varchar || The date this ping was submitted to the telemetry servers. Because a ping will typically be sent for a previous session immediately after a browser restart, this submission date may be later than the date recorded in the ping. Note also that this is a timestamp supplied by the server so is likely to be more reliable than the dates recorded in the ping itself.
|}
 
==== Engine Record ====
 
An engine record is defined as:
 
{| class="wikitable"
|-
! Field Name!! Data Type !! Description
|-
| name || varchar || The name of the engine.
|-
| took || bigint || How many milliseconds this engine took to sync.
|-
| status || varchar || The status of this engine after sync completed, or null is the status reflects success.
|-
| failureReason || row(name varchar, value varchar) || Details of any errors recorded during the sync of this engine, or null on success.
|-
| incoming || row(applied bigint, failed bigint, newFailed bigint, reconciled bigint) || Details of how many incoming records were applied, failed, failed for the first time in this sync, and reconciled.
|-
| outgoing || array(row(sent bigint, failed bigint))) || For each batch of records uploaded as part of a Sync, how many records were sent in that batch and how many failed.
|}
|}



Revision as of 23:45, 16 October 2016

Table Described

The Sync team's telemetry goes through our data pipeline and lands in Presto to be explored in Re:Dash. Below is a description of the data available in the sync_summary table.

Field Names Data Type Description
app_build_id varchar Firefox build ID (e.g. 20160801085519)
app_version varchar Firefox version (e.g. 50.0a2) - corresponds to the MOZ_APP_VERSION configure value
app_display_version varchar The application version as shown in the about dialog. Almost always identical to app_version. Corresponds to the MOZ_APP_VERSION_DISPLAY configure value.
app_name varchar Will always be the string "Firefox" in desktop submitted pings.
uid varchar Hashed Sync/FxA ID
deviceid varchar Hashed FxA device ID.
when bigint Unix timestamp of when sync occurred. Make sure to put in "quotes" since when is a reserved SQL word. Note that because this is taken from the client's clock, the time may be wildly inaccurate.
took bigint Number of milli-seconds it took to Sync.
failurereason row(name varchar, value varchar) Sync failure reason, or null if no failure.
status row(sync varchar, service varchar) The status of sync after completion, or null is both statuses record success.
why varchar Currently always null, but eventually should be the reason the sync was performed (eg, timer, button press, score update, etc)
engines array(engine_record) A record of the engines that synced. Each element of the array is in the format of an engine record.
submission_date_s3 varchar The date this ping was submitted to the telemetry servers. Because a ping will typically be sent for a previous session immediately after a browser restart, this submission date may be later than the date recorded in the ping. Note also that this is a timestamp supplied by the server so is likely to be more reliable than the dates recorded in the ping itself.

Engine Record

An engine record is defined as:

Field Name Data Type Description
name varchar The name of the engine.
took bigint How many milliseconds this engine took to sync.
status varchar The status of this engine after sync completed, or null is the status reflects success.
failureReason row(name varchar, value varchar) Details of any errors recorded during the sync of this engine, or null on success.
incoming row(applied bigint, failed bigint, newFailed bigint, reconciled bigint) Details of how many incoming records were applied, failed, failed for the first time in this sync, and reconciled.
outgoing array(row(sent bigint, failed bigint))) For each batch of records uploaded as part of a Sync, how many records were sent in that batch and how many failed.

Query Examples

The example below demonstrates how to select data in JSON object.

WITH errors AS (
  SELECT 
  	failurereason.name AS name, 
  	failurereason.value AS value 
  FROM sync_summary 
  WHERE failurereason IS NOT NULL
)

SELECT 
	name, 
	COUNT(value) 
FROM errors 
GROUP BY name