glean/glean.1.schema.json

571 строка
17 KiB
JSON
Исходник Обычный вид История

{
"$id": "moz://mozilla.org/schemas/glean/ping/1",
"$schema": "http://json-schema.org/draft-06/schema#",
"additionalProperties": false,
"description": "Schema for the ping content sent by Mozilla's glean telemetry SDK\n",
"properties": {
"$schema": {
"enum": [
"moz://mozilla.org/schemas/glean/ping/1"
],
"type": "string"
},
"client_info": {
"additionalProperties": false,
"properties": {
"android_sdk_version": {
"description": "The optional Android specific SDK version of the software running on this hardware device.",
"type": "string"
},
"app_build": {
"description": "The build identifier generated by the CI system (e.g. \"1234/A\"). For language bindings that provide automatic detection for this value, (e.g. Android/Kotlin), in the unlikely event that the build identifier can not be retrieved from the OS, it is set to \"inaccessible\". For other language bindings, if the value was not provided through configuration, this metric gets set to `Unknown`.",
"type": "string"
},
"app_channel": {
"description": "The channel the application is being distributed on.",
"type": "string"
},
"app_display_version": {
"description": "The user visible version string (e.g. \"1.0.3\"). In the unlikely event that the display version can not be retrieved, it is set to \"inaccessible\".",
"type": "string"
},
"architecture": {
"description": "The architecture of the device, (e.g. \"arm\", \"x86\").",
"type": "string"
},
"client_id": {
"description": "A UUID uniquely identifying the client.",
"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"
},
"device_manufacturer": {
"description": "The manufacturer of the device the application is running on. Not set if the device manufacturer can't be determined (e.g. on Desktop).",
"type": "string"
},
"device_model": {
"description": "The model of the device the application is running on. On Android, this is Build.MODEL, the user-visible marketing name, like \"Pixel 2 XL\". Not set if the device model can't be determined (e.g. on Desktop).",
"type": "string"
},
"first_run_date": {
"description": "The date of the first run of the application.",
"format": "datetime",
"type": "string"
},
"locale": {
"description": "The locale of the application during initialization (e.g. \"es-ES\"). If the locale can't be determined on the system, the value is [\"und\"](https://unicode.org/reports/tr35/#Unknown_or_Invalid_Identifiers), to indicate \"undetermined\".",
"type": "string"
},
"os": {
"description": "The name of the operating system. Possible values: Android, iOS, Linux, Darwin, Windows, FreeBSD, NetBSD, OpenBSD, Solaris, unknown",
"type": "string"
},
"os_version": {
"description": "The user-visible version of the operating system (e.g. \"1.2.3\"). If the version detection fails, this metric gets set to `Unknown`.",
"type": "string"
},
"telemetry_sdk_build": {
"description": "The version of the Glean SDK",
"type": "string"
}
},
"required": [
"app_build",
"app_display_version",
"architecture",
"first_run_date",
"os",
"os_version",
"telemetry_sdk_build"
],
"type": "object"
},
"events": {
"items": {
"additionalProperties": false,
"properties": {
"category": {
"type": "string"
},
"extra": {
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"maxLength": 40,
"type": "string"
},
"type": "object"
},
"name": {
"type": "string"
},
"timestamp": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"timestamp",
"category",
"name"
],
"type": "object"
},
"type": "array"
},
"metrics": {
"additionalProperties": false,
"properties": {
"boolean": {
"additionalProperties": {
"type": "boolean"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"counter": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"custom_distribution": {
"additionalProperties": {
"properties": {
"sum": {
"type": "integer"
},
"values": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"pattern": "^[0-9]+$"
},
"type": "object"
}
},
"required": [
"sum",
"values"
],
"type": "object"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"datetime": {
"additionalProperties": {
"format": "datetime",
"type": "string"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"jwe": {
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"labeled_boolean": {
"additionalProperties": {
"additionalProperties": {
"type": "boolean"
},
"propertyNames": {
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
"maxLength": 61,
"type": "string"
},
"type": "object"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"labeled_counter": {
"additionalProperties": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
"maxLength": 61,
"type": "string"
},
"type": "object"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"labeled_rate": {
"additionalProperties": {
"additionalProperties": {
"additionalProperties": false,
"properties": {
"denominator": {
"minimum": 0,
"type": "integer"
},
"numerator": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"numerator",
"denominator"
],
"type": "object"
},
"propertyNames": {
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
"maxLength": 61,
"type": "string"
},
"type": "object"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"labeled_string": {
"additionalProperties": {
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
"maxLength": 61,
"type": "string"
},
"type": "object"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"memory_distribution": {
"additionalProperties": {
"properties": {
"sum": {
"type": "integer"
},
"values": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"pattern": "^[0-9]+$"
},
"type": "object"
}
},
"required": [
"values"
],
"type": "object"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"quantity": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"rate": {
"additionalProperties": {
"additionalProperties": false,
"properties": {
"denominator": {
"minimum": 0,
"type": "integer"
},
"numerator": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"numerator",
"denominator"
],
"type": "object"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"string": {
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"string_list": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"timespan": {
"additionalProperties": {
"properties": {
"time_unit": {
"enum": [
"nanosecond",
"microsecond",
"millisecond",
"second",
"minute",
"hour",
"day"
],
"type": "string"
},
"value": {
"type": "integer"
}
},
"required": [
"value",
"time_unit"
],
"type": "object"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"timing_distribution": {
"additionalProperties": {
"properties": {
"bucket_count": {
"type": "integer"
},
"histogram_type": {
"enum": [
"linear",
"exponential"
],
"type": "string"
},
"overflow": {
"type": "integer"
},
"range": {
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"sum": {
"type": "integer"
},
"time_unit": {
"enum": [
"nanosecond",
"microsecond",
"millisecond",
"second",
"minute",
"hour",
"day"
],
"type": "string"
},
"underflow": {
"type": "integer"
},
"values": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"pattern": "^[0-9]+$"
},
"type": "object"
}
},
"required": [
"values"
],
"type": "object"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"url": {
"additionalProperties": {
"pattern": "^((?!data)([a-zA-Z][a-zA-Z0-9-\\+\\.]*):(.*))$",
"type": "string"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
},
"uuid": {
"additionalProperties": {
"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"
},
"propertyNames": {
"maxLength": 61,
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
"type": "string"
},
"type": "object"
}
},
"type": "object"
},
"ping_info": {
"additionalProperties": false,
"properties": {
"end_time": {
"format": "datetime",
"type": "string"
},
"experiments": {
"additionalProperties": {
"additionalProperties": false,
"properties": {
"branch": {
"maxLength": 100,
"type": "string"
},
"extra": {
"oneOf": [
{
"type": "null"
},
{
"properties": {
"type": {
"type": "string"
}
},
"type": "object"
}
]
}
},
"required": [
"branch"
],
"type": "object"
},
"propertyNames": {
"maxLength": 100,
"type": "string"
},
"type": "object"
},
"ping_type": {
"maxLength": 30,
"pattern": "^[a-z-_][a-z0-9-_]*$",
"type": "string"
},
"reason": {
"maxLength": 30,
"type": "string"
},
"seq": {
"type": "integer"
},
"start_time": {
"format": "datetime",
"type": "string"
}
},
"required": [
"seq",
"start_time",
"end_time"
],
"type": "object"
}
},
"required": [
"ping_info",
"client_info"
],
"title": "Ping transport",
"type": "object"
}