Skip to content

Commit 5849901

Browse files
mdboombytesized
authored andcommitted
Bug 1695795: Remove unused metric types from the Glean schema (mozilla-services#662)
* Bug 1695795: Remove unused metric types from the Glean schema Way back in the prehistory of Glean, we had a whole bunch of metric types planned that never saw the light of day. They may come back, not only through a formal design proposal process. Therefore, probably best to remove them to prevent their misuse and other confusion. * Add CHANGELOG
1 parent de8f12c commit 5849901

File tree

9 files changed

+5
-575
lines changed

9 files changed

+5
-575
lines changed

schemas/glean/glean/glean.1.schema.json

Lines changed: 0 additions & 306 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,6 @@
179179
},
180180
"type": "object"
181181
},
182-
"enumeration": {
183-
"additionalProperties": {
184-
"type": "string"
185-
},
186-
"propertyNames": {
187-
"maxLength": 61,
188-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
189-
"type": "string"
190-
},
191-
"type": "object"
192-
},
193182
"jwe": {
194183
"additionalProperties": {
195184
"type": "string"
@@ -239,64 +228,6 @@
239228
},
240229
"type": "object"
241230
},
242-
"labeled_datetime": {
243-
"additionalProperties": {
244-
"additionalProperties": {
245-
"format": "datetime",
246-
"type": "string"
247-
},
248-
"propertyNames": {
249-
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
250-
"maxLength": 61,
251-
"type": "string"
252-
},
253-
"type": "object"
254-
},
255-
"propertyNames": {
256-
"maxLength": 61,
257-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
258-
"type": "string"
259-
},
260-
"type": "object"
261-
},
262-
"labeled_enumeration": {
263-
"additionalProperties": {
264-
"additionalProperties": {
265-
"type": "string"
266-
},
267-
"propertyNames": {
268-
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
269-
"maxLength": 61,
270-
"type": "string"
271-
},
272-
"type": "object"
273-
},
274-
"propertyNames": {
275-
"maxLength": 61,
276-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
277-
"type": "string"
278-
},
279-
"type": "object"
280-
},
281-
"labeled_number": {
282-
"additionalProperties": {
283-
"additionalProperties": {
284-
"type": "number"
285-
},
286-
"propertyNames": {
287-
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
288-
"maxLength": 61,
289-
"type": "string"
290-
},
291-
"type": "object"
292-
},
293-
"propertyNames": {
294-
"maxLength": 61,
295-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
296-
"type": "string"
297-
},
298-
"type": "object"
299-
},
300231
"labeled_rate": {
301232
"additionalProperties": {
302233
"additionalProperties": {
@@ -350,184 +281,6 @@
350281
},
351282
"type": "object"
352283
},
353-
"labeled_string_list": {
354-
"additionalProperties": {
355-
"additionalProperties": {
356-
"items": {
357-
"type": "string"
358-
},
359-
"type": "array"
360-
},
361-
"propertyNames": {
362-
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
363-
"maxLength": 61,
364-
"type": "string"
365-
},
366-
"type": "object"
367-
},
368-
"propertyNames": {
369-
"maxLength": 61,
370-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
371-
"type": "string"
372-
},
373-
"type": "object"
374-
},
375-
"labeled_timing_distribution": {
376-
"additionalProperties": {
377-
"additionalProperties": {
378-
"properties": {
379-
"bucket_count": {
380-
"type": "integer"
381-
},
382-
"histogram_type": {
383-
"enum": [
384-
"linear",
385-
"exponential"
386-
],
387-
"type": "string"
388-
},
389-
"overflow": {
390-
"type": "integer"
391-
},
392-
"range": {
393-
"items": {
394-
"type": "number"
395-
},
396-
"maxItems": 2,
397-
"minItems": 2,
398-
"type": "array"
399-
},
400-
"sum": {
401-
"type": "integer"
402-
},
403-
"time_unit": {
404-
"enum": [
405-
"nanosecond",
406-
"microsecond",
407-
"millisecond",
408-
"second",
409-
"minute",
410-
"hour",
411-
"day"
412-
],
413-
"type": "string"
414-
},
415-
"underflow": {
416-
"type": "integer"
417-
},
418-
"values": {
419-
"additionalProperties": {
420-
"type": "integer"
421-
},
422-
"propertyNames": {
423-
"pattern": "^[0-9]+$"
424-
},
425-
"type": "object"
426-
}
427-
},
428-
"required": [
429-
"values"
430-
],
431-
"type": "object"
432-
},
433-
"propertyNames": {
434-
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
435-
"maxLength": 61,
436-
"type": "string"
437-
},
438-
"type": "object"
439-
},
440-
"propertyNames": {
441-
"maxLength": 61,
442-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
443-
"type": "string"
444-
},
445-
"type": "object"
446-
},
447-
"labeled_usage": {
448-
"additionalProperties": {
449-
"additionalProperties": {
450-
"type": "boolean"
451-
},
452-
"propertyNames": {
453-
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
454-
"maxLength": 61,
455-
"type": "string"
456-
},
457-
"type": "object"
458-
},
459-
"propertyNames": {
460-
"maxLength": 61,
461-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
462-
"type": "string"
463-
},
464-
"type": "object"
465-
},
466-
"labeled_use_counter": {
467-
"additionalProperties": {
468-
"additionalProperties": {
469-
"properties": {
470-
"denominator": {
471-
"properties": {
472-
"name": {
473-
"maxLength": 30,
474-
"pattern": "^[a-z_][a-z0-9_]*$",
475-
"type": "string"
476-
},
477-
"value": {
478-
"type": "integer"
479-
}
480-
},
481-
"type": "object"
482-
},
483-
"values": {
484-
"additionalProperties": {
485-
"type": "integer"
486-
},
487-
"propertyNames": {
488-
"maxLength": 30,
489-
"pattern": "^[a-z_][a-z0-9_]*$",
490-
"type": "string"
491-
},
492-
"type": "object"
493-
}
494-
},
495-
"type": "object"
496-
},
497-
"propertyNames": {
498-
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
499-
"maxLength": 61,
500-
"type": "string"
501-
},
502-
"type": "object"
503-
},
504-
"propertyNames": {
505-
"maxLength": 61,
506-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
507-
"type": "string"
508-
},
509-
"type": "object"
510-
},
511-
"labeled_uuid": {
512-
"additionalProperties": {
513-
"additionalProperties": {
514-
"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}$",
515-
"type": "string"
516-
},
517-
"propertyNames": {
518-
"comment": "This must be at least the length of 'category.name' metric names to support error reporting",
519-
"maxLength": 61,
520-
"type": "string"
521-
},
522-
"type": "object"
523-
},
524-
"propertyNames": {
525-
"maxLength": 61,
526-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
527-
"type": "string"
528-
},
529-
"type": "object"
530-
},
531284
"memory_distribution": {
532285
"additionalProperties": {
533286
"properties": {
@@ -556,17 +309,6 @@
556309
},
557310
"type": "object"
558311
},
559-
"number": {
560-
"additionalProperties": {
561-
"type": "number"
562-
},
563-
"propertyNames": {
564-
"maxLength": 61,
565-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
566-
"type": "string"
567-
},
568-
"type": "object"
569-
},
570312
"quantity": {
571313
"additionalProperties": {
572314
"type": "integer"
@@ -725,54 +467,6 @@
725467
},
726468
"type": "object"
727469
},
728-
"usage": {
729-
"additionalProperties": {
730-
"type": "boolean"
731-
},
732-
"propertyNames": {
733-
"maxLength": 61,
734-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
735-
"type": "string"
736-
},
737-
"type": "object"
738-
},
739-
"use_counter": {
740-
"additionalProperties": {
741-
"properties": {
742-
"denominator": {
743-
"properties": {
744-
"name": {
745-
"maxLength": 30,
746-
"pattern": "^[a-z_][a-z0-9_]*$",
747-
"type": "string"
748-
},
749-
"value": {
750-
"type": "integer"
751-
}
752-
},
753-
"type": "object"
754-
},
755-
"values": {
756-
"additionalProperties": {
757-
"type": "integer"
758-
},
759-
"propertyNames": {
760-
"maxLength": 30,
761-
"pattern": "^[a-z_][a-z0-9_]*$",
762-
"type": "string"
763-
},
764-
"type": "object"
765-
}
766-
},
767-
"type": "object"
768-
},
769-
"propertyNames": {
770-
"maxLength": 61,
771-
"pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$",
772-
"type": "string"
773-
},
774-
"type": "object"
775-
},
776470
"uuid": {
777471
"additionalProperties": {
778472
"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}$",

templates/include/glean/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,8 @@
7171
`scripts/extract_glean_client_info_descriptions`)
7272

7373
- The `rate` metric type is an object with a `numerator` and `denominator`.
74+
75+
- Unused / unimplemented metric types have been removed. This includes `number`,
76+
`labeled_number`, `labeled_string_list`, `enumeration`, `labeled_enumeration`,
77+
`labeled_timing_distribution`, `labeled_datetime`, `use_counter`,
78+
`labeled_use_counter`, `usage`, `labeled_usage`, and `labeled_uuid`.

templates/include/glean/enumeration.1.schema.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)