Do not ignore previously seen dynamic labels before Glean inits
Categories
(Data Platform and Tools :: Glean: SDK, defect, P3)
Tracking
(Not tracked)
People
(Reporter: Dexter, Assigned: mdroettboom)
References
Details
(Whiteboard: [telemetry:glean-rs:m11])
With bug 1588092, we made the glean-core implementation behave like the glean-ac undocumented behaviour to prevent startup crashes when using LabeledMetricType
with dynamic labels before Glean inits.
When labeled metrics are used with dynamic labels before Glean inits, we ignore any previously persisted label. If someone where to use 16 new dynamic labels before Glean initializes, it would send 16 new labels even though we already stored 4 old ones in our database.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Part of what makes this hard is the overator overloading syntax, since the look up of the label happens syncronously and the recording happens asynchronously.
One solution there would be to (backward incompatibly) change the label recording syntax from labeledCounter["label"].add(1)
to labeledCounter.add("label", 1)
. However, this will require new wrappers for each labeled metric type.
Or, there might be a way to make label lookup part of the deferred coroutine call somehow...
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Description
•