Open Bug 1467829 Opened 6 years ago Updated 2 years ago

Telemetry JS errors have no stack information, making them hard to track down

Categories

(Toolkit :: Telemetry, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: Gijs, Unassigned)

References

(Depends on 1 open bug)

Details

E.g. https://dxr.mozilla.org/mozilla-central/rev/199a085199815cc99daa658956a7c9436e1d436b/toolkit/components/telemetry/TelemetryHistogram.cpp#1689 There's a few others in the same file. I think it should be fairly easy to use nsContentUtils to report something that at least has some caller information.
(In reply to :Gijs (he/him) from comment #0) > I think it should be fairly easy to use nsContentUtils to report something > that at least has some caller information. Are you thinking about a specific function? From looking around, e.g. `nsContentUtils::LogSimpleConsoleError()` doesn't print any caller information.
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to Georg Fritzsche [:gfritzsche] from comment #1) > (In reply to :Gijs (he/him) from comment #0) > > I think it should be fairly easy to use nsContentUtils to report something > > that at least has some caller information. > > Are you thinking about a specific function? > From looking around, e.g. `nsContentUtils::LogSimpleConsoleError()` doesn't > print any caller information. Ugh, yeah, so, that's bug 1438553. It may be possible to use the code from that patch here directly, assuming the same issues that have stopped that patch from landing don't apply to these callsites, which I'm not sure about off-hand...
Flags: needinfo?(gijskruitbosch+bugs)
See Also: → 1438553
(In reply to :Gijs (he/him) from comment #2) > (In reply to Georg Fritzsche [:gfritzsche] from comment #1) > > (In reply to :Gijs (he/him) from comment #0) > > > I think it should be fairly easy to use nsContentUtils to report something > > > that at least has some caller information. > > > > Are you thinking about a specific function? > > From looking around, e.g. `nsContentUtils::LogSimpleConsoleError()` doesn't > > print any caller information. > > Ugh, yeah, so, that's bug 1438553. It may be possible to use the code from > that patch here directly, assuming the same issues that have stopped that > patch from landing don't apply to these callsites, which I'm not sure about > off-hand... Let's wait for the discussion on that bug to settle, I'm adding it as a dependency.
Depends on: 1438553
Priority: -- → P3
So this is specifically about stack information, not just line/file information? JS_ReportErrorASCII should have the latter.
(In reply to Boris Zbarsky [:bz] (no decent commit message means r-) from comment #4) > So this is specifically about stack information, not just line/file > information? JS_ReportErrorASCII should have the latter. This is what we're using there. Mh, leaving myself a ni? to verify if the stack gets reported there or not.
Flags: needinfo?(alessio.placitelli)
Maybe I was unclear. JS_ReportErrorASCII will generally _not_ have a stack. It _will_ have the file and line for the topmost stack frame only on the error report.
(In reply to Boris Zbarsky [:bz] (no decent commit message means r-) from comment #6) > Maybe I was unclear. JS_ReportErrorASCII will generally _not_ have a stack. > It _will_ have the file and line for the topmost stack frame only on the > error report. Ouch, sorry, I misread comment 4. Yes, this is specifically about stack information.
Flags: needinfo?(alessio.placitelli)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.