@@ -29,6 +29,16 @@ export interface ConfigurationInterface {
2929 plugins ?: Plugin [ ] ,
3030 // The HTTP client implementation to use for uploading pings.
3131 httpClient ?: Uploader ,
32+ // Qt-only fields
33+ //
34+ // These values are not easily accessible from QML,
35+ // so we expose them as init fields for the caller to fill them out.
36+ //
37+ // The architecture of the device (e.g. "arm", "x86").
38+ readonly architecture ?: string ,
39+ // The user-visible version of the operating system (e.g. "1.2.3").
40+ // If the version detection fails, this metric gets set to Unknown.
41+ readonly osVersion ?: string ,
3242}
3343
3444// Important: the `Configuration` should only be used internally by the Glean singleton.
@@ -41,6 +51,12 @@ export class Configuration implements ConfigurationInterface {
4151 readonly appDisplayVersion ?: string ;
4252 // The server pings are sent to.
4353 readonly serverEndpoint : string ;
54+ // The architecture of the device (e.g. "arm", "x86").
55+ readonly architecture ?: string ;
56+ // The user-visible version of the operating system (e.g. "1.2.3").
57+ // If the version detection fails, this metric gets set to Unknown.
58+ readonly osVersion ?: string ;
59+
4460 // Debug configuration.
4561 debug : DebugOptions ;
4662 // The HTTP client implementation to use for uploading pings.
@@ -50,6 +66,8 @@ export class Configuration implements ConfigurationInterface {
5066 this . channel = config ?. channel ;
5167 this . appBuild = config ?. appBuild ;
5268 this . appDisplayVersion = config ?. appDisplayVersion ;
69+ this . architecture = config ?. architecture ;
70+ this . osVersion = config ?. osVersion ;
5371
5472 this . debug = Configuration . sanitizeDebugOptions ( config ?. debug ) ;
5573
0 commit comments