I've been testing out AppInsights and implementing the code below: (Encountering a 500 error on fetch)
private callMethod(): void {
this._callMethodInternal();
}
private async _callMethodInternal(): Promise<void> {
try {
await fetch("https://localhost:44369/api/values", {
method: "GET",
headers: {
Accept: "application/json",
"Content-Type": "text/json"
}
});
} catch (err) {
AppInsights.trackException(err);
throw err;
}
}
The exception is visible in Application Insights, however, the "Failed method" property displays "Unknown" as the value. Is there a way to display the correct method name?
Thank you
(https://github.com/Microsoft/ApplicationInsights-JS/issues/680)