Skip to content

Commit

Permalink
Bug 1932210 - Add labeled_quantity glean metric type (#831)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWu authored Nov 19, 2024
1 parent 7eeb9eb commit 8648085
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
19 changes: 19 additions & 0 deletions schemas/glean/glean/glean-min.1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,25 @@
},
"type": "object"
},
"labeled_quantity": {
"additionalProperties": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
"maxLength": 71,
"type": "string"
},
"type": "object"
},
"propertyNames": {
"maxLength": 111,
"pattern": "^[a-z_][a-z0-9_\\.]+$",
"type": "string"
},
"type": "object"
},
"labeled_rate": {
"additionalProperties": {
"additionalProperties": {
Expand Down
19 changes: 19 additions & 0 deletions schemas/glean/glean/glean.1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,25 @@
},
"type": "object"
},
"labeled_quantity": {
"additionalProperties": {
"additionalProperties": {
"type": "integer"
},
"propertyNames": {
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
"maxLength": 71,
"type": "string"
},
"type": "object"
},
"propertyNames": {
"maxLength": 111,
"pattern": "^[a-z_][a-z0-9_\\.]+$",
"type": "string"
},
"type": "object"
},
"labeled_rate": {
"additionalProperties": {
"additionalProperties": {
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 type `labeled_quantity` [Bug 1932210](https://bugzilla.mozilla.org/show_bug.cgi?id=1932210)

- Increase maximum character limit for metric labels from 61 to 71 [Bug 1929078](https://bugzilla.mozilla.org/show_bug.cgi?id=1929078)

- New metric types `labeled_{custom|memory|timing}_distribution` [bug 1657947](https://bugzilla.mozilla.org/show_bug.cgi?id=1657947).
Expand Down
7 changes: 7 additions & 0 deletions templates/include/glean/metrics.1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@
@GLEAN_BASE_OBJECT_1_JSON@,
"additionalProperties": @GLEAN_QUANTITY_1_JSON@
},
"labeled_quantity": {
@GLEAN_BASE_OBJECT_1_JSON@,
"additionalProperties": {
@GLEAN_LABELED_GROUP_1_JSON@,
"additionalProperties": @GLEAN_QUANTITY_1_JSON@
}
},
"timespan": {
@GLEAN_BASE_OBJECT_1_JSON@,
"additionalProperties": @GLEAN_TIMESPAN_1_JSON@
Expand Down

1 comment on commit 8648085

@dataops-ci-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integration report for "Bug 1932210 - Add labeled_quantity glean metric type (#831)"

bq_schema_7eeb9ebc-86480854.diff

Click to expand!
diff --new-file --exclude '*.txt' /app/integration/7eeb9ebc/glean.glean.1.bq /app/integration/86480854/glean.glean.1.bq
457a458,486
>                 "mode": "NULLABLE",
>                 "name": "value",
>                 "type": "INT64"
>               }
>             ],
>             "mode": "REPEATED",
>             "name": "value",
>             "type": "RECORD"
>           }
>         ],
>         "mode": "REPEATED",
>         "name": "labeled_quantity",
>         "type": "RECORD"
>       },
>       {
>         "fields": [
>           {
>             "mode": "NULLABLE",
>             "name": "key",
>             "type": "STRING"
>           },
>           {
>             "fields": [
>               {
>                 "mode": "NULLABLE",
>                 "name": "key",
>                 "type": "STRING"
>               },
>               {

compact_schema_7eeb9ebc-86480854.diff

Click to expand!
diff --new-file --exclude '*.bq' /app/integration/7eeb9ebc/glean.glean.1.txt /app/integration/86480854/glean.glean.1.txt
53a54,56
> root.metrics.labeled_quantity.[].key STRING
> root.metrics.labeled_quantity.[].value.[].key STRING
> root.metrics.labeled_quantity.[].value.[].value INT64

Please sign in to comment.