Skip to content

Commit

Permalink
bug 1925346 - Support new metric type labeled_quantity
Browse files Browse the repository at this point in the history
  • Loading branch information
chutten committed Oct 21, 2024
1 parent 21b1e2d commit 4586e38
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Bugfix: Remove unused keyword argument from exception ([#755](https://github.com/mozilla/glean_parser/pull/755))
- Add Go log outputter support for custom pings (`go_server`) ([#758](https://github.com/mozilla/glean_parser/pull/758))
- New Metric Type: `labeled_quantity` ([bug 1925346](https://bugzilla.mozilla.org/show_bug.cgi?id=1925346))

## 15.0.1

Expand Down
2 changes: 2 additions & 0 deletions glean_parser/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ class LabeledMemoryDistribution(Labeled, MemoryDistribution):
class LabeledTimingDistribution(Labeled, TimingDistribution):
typename = "labeled_timing_distribution"

class LabeledQuantity(Labeled, Quantity):
typename = "labeled_quantity"

class Rate(Metric):
typename = "rate"
Expand Down
3 changes: 2 additions & 1 deletion glean_parser/schemas/metrics.2-0-0.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ definitions:
`labeled_boolean`, `labeled_string`, `labeled_counter`,
`labeled_custom_distribution`, `labeled_memory_distribution`,
`labeled_timing_distribution`.
`labeled_timing_distribution`, `labeled_quantity`.
- `text`: Record long text data.
Expand Down Expand Up @@ -151,6 +151,7 @@ definitions:
- labeled_custom_distribution
- labeled_memory_distribution
- labeled_timing_distribution
- labeled_quantity
- rate
- text
- object
Expand Down
8 changes: 8 additions & 0 deletions tests/data/all_metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,11 @@ all_metrics:
labels:
- aLabel
- 2label

labeled_quantity:
<<: *defaults
type: labeled_quantity
unit: tabs
labels:
- aLabel
- 2label

0 comments on commit 4586e38

Please sign in to comment.