Open Bug 1542891 Opened 6 years ago Updated 2 years ago

Consider having Telemetry APIs throw when in automation

Categories

(Toolkit :: Telemetry, task, P3)

task

Tracking

()

People

(Reporter: chutten, Unassigned)

References

Details

We have designed Telemetry recording functions (accumulate, recordEvent, add, etc.) to never throw. In the event of trying to record an invalid, malformed, excessively-long, or unknown value to a disabled, expired, incorrect, or unknown metric, we log (to the Browser Console, since validation might happen on a different process than the recording) and otherwise-silently fail.

But there's a case to be made that maybe in automation we should throw. This would be an additional level of testing assistance we could provide to our API's consumers.

This bug is about exploring the design of such a system (for instance, what should it do if it fails validation on a different process from the client? Does Cu.isInAutomation work for all the cases we expect?) and possibly for implementing it. Valid results include deciding not to do it.

Type: defect → task
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.