Javascript Application Insights JS trackException显示;失败的方法:';未知'&引用;
我正在试用AppInsights并使用以下代码: (获取失败,回复为500)Javascript Application Insights JS trackException显示;失败的方法:';未知'&引用;,javascript,typescript,azure-application-insights,Javascript,Typescript,Azure Application Insights,我正在试用AppInsights并使用以下代码: (获取失败,回复为500) private callMethod():void{ 这是._callMethodInternal(); } 私有异步_callMethodInternal():承诺{ 试一试{ 等待取回(“https://localhost:44369/api/values", { 方法:“获取”, 标题:{ 接受:“应用程序/json”, “内容类型”:“文本/json” } }); }捕捉(错误){ AppInsights.tr
private callMethod():void{
这是._callMethodInternal();
}
私有异步_callMethodInternal():承诺{
试一试{
等待取回(“https://localhost:44369/api/values", {
方法:“获取”,
标题:{
接受:“应用程序/json”,
“内容类型”:“文本/json”
}
});
}捕捉(错误){
AppInsights.trackException(err);
犯错误;
}
}
异常显示在Application Insights中,但“Failed method”属性将“Unknown”显示为值。
有没有办法显示正确的方法名
谢谢
()您没有传递正确的参数。下面是更新的方法
trackException(exception: Error, handledAt?: string, properties?: {[string]:string}, measurements?: {[string]:number}, severityLevel?: AI.SeverityLevel)
请查看以下链接以供参考
然后需要什么参数来解决方法:未知问题?
trackException(exception: Error, handledAt?: string, properties?: {[string]:string}, measurements?: {[string]:number}, severityLevel?: AI.SeverityLevel)