ApplicationInsights-JS icon indicating copy to clipboard operation
ApplicationInsights-JS copied to clipboard

[BUG] enableUnhandledPromiseRejectionTracking shows no error trace

Open Karlie-777 opened this issue 3 years ago • 4 comments

when parsing onunhandledrejection error event, error.reason.toString() is passed to Exception.CreateAutoException() function and the error.reason.toString() will expose no detailed trace stack . Instead error.reason.stack.toString() should be used to enable full trace tracking.

Karlie-777 avatar Sep 29 '21 21:09 Karlie-777

linked to issue: https://github.com/microsoft/ApplicationInsights-JS/issues/1675

Karlie-777 avatar Sep 29 '21 21:09 Karlie-777

hi @Karlie-777 , is there any update on this bug please? We are also not seeing any stack trace with enableUnhandledPromiseRejectionTracking enabled, SDK version is 2.7.3. Rejected promise is correctly logged but with no stack information. Inspection of PromiseRejectionEvent shows that stack is under reason prop but is not parsed by _getStackFromErrorObj: image

nika1001 avatar Sep 05 '22 11:09 nika1001

@nika1001 please try the latest version 2.8.5+ since we have some updates in new version. And also when full error trace is not available, error stack will be not parsed.

Karlie-777 avatar Sep 06 '22 23:09 Karlie-777

@nika1001 FYI - the fix is now checked in and the automated pre-release night build has been published with #1900, so you should be able to pre-validate that this fixes your issue by simply using the "@nightly" build as the version. The full nightly release night build is nightly-2209-02

MSNev avatar Sep 15 '22 23:09 MSNev

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Oct 11 '23 00:10 github-actions[bot]