Closed Bug 1776777 Opened 4 years ago Closed 4 years ago

[FOG] Assigning an Invalid Label in Labeled Metrics causes access to other elements to throw

Categories

(Toolkit :: Telemetry, defect)

Desktop
Unspecified
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: perry.mcmanis, Unassigned)

Details

When dealing with a labeled metric, there is a potential for loss of data in FOG if an invalid label has a value assigned to it.

I have observed this behavior in FOG only to date; in Glean rust and js I was not able to induce the problem. I have not tested this with every labeled type, but have observed it with labeled counter and labeled string

Expected behavior:
If a valid value is assigned to a valid label, it should be accessible even if values are assigned to other, invalid labels

Observed behavior:
If a valid value with a valid label exists, it is accessible. If a valid value is assigned to a valid label afterwards, calls to the valid label throw with a loss of data exception

Steps to reproduce:

  1. create a labeled string test metric
  2. assign a valid value to a valid label
  3. confirm this can be accessed normally
  4. assign a valid value to an invalid label
  5. attempt to access the valid label/value from 2.
  6. confirm NS_ERROR_LOSS_OF_SIGNIFICANT_DATA thrown

This behavior is a consequence of an intended design choice. Overall error handling will be improved in the future that will likely see this behavior changed but for now this ticket will not get a 'fix'

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.