我们正在使用 .NET CORE 3.0 Web 应用程序。我们尚未包含任何 App Insight 的 App Insight Nuget 包。但我们直接从 Azure 门户启用了 appinsight。完成此操作后,我期望显示服务器请求、故障和实时指标。
但即使应用程序正在运行,我仍然在实时指标上收到此错误: 不可用:您的应用处于离线状态或使用较旧的 SDK
我们不必为 2.7 NET CORE 版本包含任何 appinsight nuget 包。知道为什么没有显示指标吗?
最佳答案
正如 the docs 中明确指出的您必须包含一些 NuGet 包:
Get Started
If you haven't yet install Application Insights in your web app, do that now.
In addition to the standard Application Insights packages Microsoft.ApplicationInsights.PerfCounterCollector is required to enable Live Metrics stream.
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.
Redeploy your app.
In the Azure portal, open the Application Insights resource for your app, and then open Live Stream.
如果您不包含这些软件包,某些遥测数据将发送到 App Insights,但此遥测数据不会显示在实时指标流中。
关于azure - App Insight 不可用,始终显示应用程序离线或 SDK 较旧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59964759/