本文介绍了App Insight不可用,持续显示应用程序为脱机状态或SDK旧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用.NET CORE 3.0 Web应用程序.我们未包含任何适用于App Insight的App Insight Nuget程序包.但是我们直接从Azure门户启用了appinsight.完成此操作后,我希望显示服务器请求,故障和实时指标.

We are using .NET CORE 3.0 web application. We haven't included any App Insight Nuget package for App Insight. But we have enabled the appinsight directly from Azure Portal. After doing this, I'm expecting the server request, failures and live metrics to display.

但是即使应用正在运行,我仍会在实时指标上收到此错误:不可用:您的应用程序离线或使用较旧的SDK

But I keep getting this error on live metrics even though app is running:Not available: your app is offline or using an older SDK

对于2.7 NET CORE版本,我们不必包含任何appinsight nuget packags.知道为什么不显示任何指标吗?

We didn't have to include any appinsight nuget packags for 2.7 NET CORE version. Any idea why no metrics being displayed?

推荐答案

必须使用的文档包括一些NuGet软件包:

As clearly stated in the docs you have to include some NuGet packages:

  • 如果您尚未在Web应用程序中安装Application Insights,请立即执行.

  • If you haven't yet install Application Insights in your web app, do that now.

除了标准的Application Insights软件包外,还需要Microsoft.ApplicationInsights.PerfCounterCollector才能启用实时指标流.

In addition to the standard Application Insights packages Microsoft.ApplicationInsights.PerfCounterCollector is required to enable Live Metrics stream.

更新到Application Insights软件包的最新版本.在Visual Studio中,右键单击您的项目,然后选择管理Nuget程序包".打开更新"选项卡,然后选择所有Microsoft.ApplicationInsights.*程序包.

Update to the latest version of the Application Insights package. In Visual Studio, right-click your project and choose Manage Nuget packages. Open the Updates tab, and select all the Microsoft.ApplicationInsights.* packages.

重新部署您的应用.

在Azure门户中,为您的应用打开Application Insights资源,然后打开实时流.

In the Azure portal, open the Application Insights resource for your app, and then open Live Stream.

如果您不包括那些软件包,则某些遥测会发送到App Insights,但此遥测将不会显示在Live Metrics流中.

If you don't include those packages some telemetry is send to App Insights, but this telemetry won't be shown in the Live Metrics stream.

这篇关于App Insight不可用,持续显示应用程序为脱机状态或SDK旧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 03:03