[glean] TECHDEBT: Move value validation and correction from MetricType to StorageEngine
Categories
(Toolkit :: Telemetry, enhancement, P1)
Tracking
()
People
(Reporter: mdroettboom, Assigned: travis_)
References
Details
(Whiteboard: [telemetry:mobilesdk:m7])
Attachments
(1 file)
There is a lot of value validation that happens in the *MetricType
classes, such as truncating strings when they are too long. In some cases for technical reasons, the validation is split between the *MetricType
and *StorageEngine
classes (individual strings in a string list vs. the string list as a whole).
All of this should be moved to the *StorageEngine
classes. There are at least two good reasons for this:
-
When we oxidize glean, we will be oxidizing the internal classes (
*StorageEngine
) not the public API interface classes (*MetricType
). Having important logic in the*MetricType
classes means we will need to duplicate that logic across all flavors of glean (Android, iOS etc.) -
Notating errors currently has to happen in a separate coroutine worker from the recording of the metric value itself. This causes race conditions that makes testing harder and requires the addition of a "hack" to record errors synchronously during testing.
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
This was merged \o/ closing it!
Description
•