Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug 1657947 - New Glean metric types labeled_{custom|memory|timing}_distribution #821

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 157 additions & 0 deletions schemas/glean/glean/glean-min.1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,87 @@
},
"type": "object"
},
"labeled_custom_distribution": {
"additionalProperties": {
"additionalProperties": {
"properties": {
"count": {
"description": "This was accidentally sent in the past and is now deprecated. See https://bugzilla.mozilla.org/show_bug.cgi?id=1799509#c5",
"type": "integer"
},
"sum": {
"type": "integer"
},
"values": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"pattern": "^[0-9]+$"
},
"type": "object"
}
},
"required": [
"sum",
"values"
],
"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": 111,
"pattern": "^[a-z_][a-z0-9_\\.]+$",
"type": "string"
},
"type": "object"
},
"labeled_memory_distribution": {
"additionalProperties": {
"additionalProperties": {
"properties": {
"count": {
"description": "This was accidentally sent in the past and is now deprecated. See https://bugzilla.mozilla.org/show_bug.cgi?id=1799509#c5",
"type": "integer"
},
"sum": {
"type": "integer"
},
"values": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"pattern": "^[0-9]+$"
},
"type": "object"
}
},
"required": [
"values"
],
"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": 111,
"pattern": "^[a-z_][a-z0-9_\\.]+$",
"type": "string"
},
"type": "object"
},
"labeled_rate": {
"additionalProperties": {
"additionalProperties": {
Expand Down Expand Up @@ -219,6 +300,82 @@
},
"type": "object"
},
"labeled_timing_distribution": {
"additionalProperties": {
"additionalProperties": {
"properties": {
"bucket_count": {
"type": "integer"
},
"count": {
"description": "This was accidentally sent in the past and is now deprecated. See https://bugzilla.mozilla.org/show_bug.cgi?id=1799509#c5",
"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": {
"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": 111,
"pattern": "^[a-z_][a-z0-9_\\.]+$",
"type": "string"
},
"type": "object"
},
"memory_distribution": {
"additionalProperties": {
"properties": {
Expand Down
157 changes: 157 additions & 0 deletions schemas/glean/glean/glean.1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,87 @@
},
"type": "object"
},
"labeled_custom_distribution": {
"additionalProperties": {
"additionalProperties": {
"properties": {
"count": {
"description": "This was accidentally sent in the past and is now deprecated. See https://bugzilla.mozilla.org/show_bug.cgi?id=1799509#c5",
"type": "integer"
},
"sum": {
"type": "integer"
},
"values": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"pattern": "^[0-9]+$"
},
"type": "object"
}
},
"required": [
"sum",
"values"
],
"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": 111,
"pattern": "^[a-z_][a-z0-9_\\.]+$",
"type": "string"
},
"type": "object"
},
"labeled_memory_distribution": {
"additionalProperties": {
"additionalProperties": {
"properties": {
"count": {
"description": "This was accidentally sent in the past and is now deprecated. See https://bugzilla.mozilla.org/show_bug.cgi?id=1799509#c5",
"type": "integer"
},
"sum": {
"type": "integer"
},
"values": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"pattern": "^[0-9]+$"
},
"type": "object"
}
},
"required": [
"values"
],
"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": 111,
"pattern": "^[a-z_][a-z0-9_\\.]+$",
"type": "string"
},
"type": "object"
},
"labeled_rate": {
"additionalProperties": {
"additionalProperties": {
Expand Down Expand Up @@ -305,6 +386,82 @@
},
"type": "object"
},
"labeled_timing_distribution": {
"additionalProperties": {
"additionalProperties": {
"properties": {
"bucket_count": {
"type": "integer"
},
"count": {
"description": "This was accidentally sent in the past and is now deprecated. See https://bugzilla.mozilla.org/show_bug.cgi?id=1799509#c5",
"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": {
"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": 111,
"pattern": "^[a-z_][a-z0-9_\\.]+$",
"type": "string"
},
"type": "object"
},
"memory_distribution": {
"additionalProperties": {
"properties": {
Expand Down
2 changes: 2 additions & 0 deletions templates/include/glean/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Version 1

- New metric types `labeled_{custom|memory|timing}_distribution` [bug 1657947](https://bugzilla.mozilla.org/show_bug.cgi?id=1657947).

- Added new schema "glean-min" which contains `metrics` and `events` but does not have `*_info` top level properties. Used to support pings that are configured to exclude the standard Glean `info` fields.

- Added optional `session_id` and optional `session_count` client info field. See [Bug 1862955](https://bugzilla.mozilla.org/show_bug.cgi?id=1862955).
Expand Down
21 changes: 21 additions & 0 deletions templates/include/glean/metrics.1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,35 @@
@GLEAN_BASE_OBJECT_1_JSON@,
"additionalProperties": @GLEAN_TIMING_DISTRIBUTION_1_JSON@
},
"labeled_timing_distribution": {
@GLEAN_BASE_OBJECT_1_JSON@,
"additionalProperties": {
@GLEAN_LABELED_GROUP_1_JSON@,
"additionalProperties": @GLEAN_TIMING_DISTRIBUTION_1_JSON@
}
},
"memory_distribution": {
@GLEAN_BASE_OBJECT_1_JSON@,
"additionalProperties": @GLEAN_MEMORY_DISTRIBUTION_1_JSON@
},
"labeled_memory_distribution": {
@GLEAN_BASE_OBJECT_1_JSON@,
"additionalProperties": {
@GLEAN_LABELED_GROUP_1_JSON@,
"additionalProperties": @GLEAN_MEMORY_DISTRIBUTION_1_JSON@
}
},
"custom_distribution": {
@GLEAN_BASE_OBJECT_1_JSON@,
"additionalProperties": @GLEAN_CUSTOM_DISTRIBUTION_1_JSON@
},
"labeled_custom_distribution": {
@GLEAN_BASE_OBJECT_1_JSON@,
"additionalProperties": {
@GLEAN_LABELED_GROUP_1_JSON@,
"additionalProperties": @GLEAN_CUSTOM_DISTRIBUTION_1_JSON@
}
},
"datetime": {
@GLEAN_BASE_OBJECT_1_JSON@,
"additionalProperties": @GLEAN_DATETIME_1_JSON@
Expand Down