Closed Bug 1827926 Opened 3 years ago Closed 3 years ago

FOG JS and C++ metric API errors: can they tell me which metric we're error-ing on?

Categories

(Toolkit :: Telemetry, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: chutten, Assigned: chutten)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In absence of a solution to bug 1691073 we have a few error messages in FOG's Multi-Language Architecture (MLA, aka the place where C++ and JS APIs are impl'd). None of them report what the metric's name is that's having the error, though, and that makes it difficult to go from "hey, there's a warning message" to "I've fixed the problem".

Also, none of these messages say "Data is now lost as a result." for cases where that's a case. Even if we can't find a good way to put the metric names in, we should be clear about consequences.

Alas, there is no runtime map from metric id to metric name. We'd need to start storing string table indices or the full metric_entity_t in the nsIGlean{MetricType} instances, plus design and develop a way to handle this for runtime-registered metrics. I'd consider it, but it's only the JS API for event record() that has this problem.

So for now I'll stick with just clarifying the warning comes with consequences: "Event will not be recorded."

Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d6382f25745a Log consequences for event errors r=perry.mcmanis
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: