53
edits
(filling in some detail on metrics service) |
(add guid and response details) |
||
Line 5: | Line 5: | ||
= XML Representation = | = XML Representation = | ||
The XML document that holds event data uses the namespace <tt>http://www.mozilla.org/metrics</tt>. The root element of the document is the <tt><log | The XML document that holds event data uses the namespace <tt>http://www.mozilla.org/metrics</tt>. The root element of the document is the <tt><log></tt> element, which has no predefined attributes. | ||
For more information on specific event types, see [[Browser Metrics:Data Collectors | Data Collector Design]]. | For more information on specific event types, see [[Browser Metrics:Data Collectors | Data Collector Design]]. | ||
= Client ID = | |||
The data collection service generates a client GUID the first time data is uploaded. The GUID is placed into an HTTP header, as follows: | |||
X-Moz-Client-ID: b317a3ab-05a5-4bd2-b783-5768024727f6 | |||
The GUID is stored and reused for subsequent uploads, which allows the data to be correlated across sessions. Note that no other identifying information, such as a cookie, is sent when data is uploaded. | |||
= Server Response = | |||
After uploading a log file, the client receives a response from the server which specifies new parameters for the collection service. This allows for the exact data collected by users to be tuned as needed. The response document takes the following format: | |||
<code> | |||
<config xmlns="http://www.mozilla.org/metrics"> | |||
<collectors> | |||
<collector type="ui"> | |||
<collector type="load"> | |||
</collectors> | |||
<limit events="200"/> | |||
<upload interval="600"/> | |||
</config> | |||
</code> | |||
More detailed descriptions of the response elements follow: | |||
Element name: <tt>config</tt> | |||
The root element of the configuration document. | |||
Attributes: none | |||
Element name: <tt>collectors</tt> | |||
A grouping element which contains 0 or more <tt>collector</tt> elements. | |||
Attributes: none | |||
Element name: <tt>collector</tt> | |||
Enables a specific collector on the client. | |||
Attributes: | |||
<tt>type = [collector name]</tt> | |||
Specifies the name of the collector to enable. Valid collector types include <tt>profile, window, load, </tt> and <tt>ui</tt>. See the [[Browser Metrics:Data Collectors | Data Collector Design]] for details on what these collectors do. | |||
Element name: <tt>limit</tt> | |||
Limits the amount of data collected by the client. | |||
Attributes: | |||
<tt>events = [number of events]</tt> | |||
The client will stop collecting events once this number of events have been logged. The event count resets to 0 after a log upload. | |||
Element name: <tt>upload</tt> | |||
Describes how the client upload should be configured. | |||
Attributes: | |||
<tt>interval = [number of seconds]</tt> | |||
The client should perform its next upload this many seconds from now. |
edits