Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Application Insights JS trackException显示;失败的方法:';未知'&引用;_Javascript_Typescript_Azure Application Insights - Fatal编程技术网

Javascript Application Insights JS trackException显示;失败的方法:';未知'&引用;

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

我正在试用AppInsights并使用以下代码: (获取失败,回复为500)

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)