- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已在 Web 应用程序中启用 Application Insights,但是当我转到 Application Insights 中的实时指标时,我收到上述错误“不可用:您的应用程序已离线或使用较旧的 SDK”。
我需要在 Azure 中打开什么?任何帮助或指导将不胜感激
最佳答案
我在 Azure 门户中遇到了同样的问题和消息,App Insights、实时指标和应用程序 map 无法正常工作。在浏览了几个解决方案描述后,我想向您提供我的解决方案的精髓。
首先:我从头开始,一路向前。我没有遇到防火墙问题。但除了这里的答案 social.msdn.com我会更详细地告诉你我的方法。请注意:此解决方案是使用 .Net 6.0 和 EF 6.0 开发和测试的。
我需要设置使用 Azure Web 应用程序的所有先决条件!
我做到了
我将以下代码添加到我的 .Net 6 Web 应用启动类中以启用 Application Insights 遥测
...
public void ConfigureServices(IServiceCollection services)
{
// The following line enables Application Insights telemetry collection*
services.AddApplicationInsightsTelemetry();
}...
因此 Nuget 包
Microsoft.ApplicationInsights.AspNetCore (for me v2.20.0)
需要安装。
此后仍然没有数据发送到遥测。
实时指标显示:“不可用:您的应用程序已离线或使用较旧的 SDK”应用程序 map 未显示任何内容
您需要的其他 Nuget 软件包:
Microsoft.ApplicationInsights.PerfCounterCollector (v2.20.0)
Microsoft.ApplicationInsights.Web (v2.20.0)
此后仍然没有数据发送到遥测。
最后但最重要的是这是我的错:为开发重新部署我的 azure 设置(全部通过基础设施即代码)后,Application Insights InstrumentationKey 发生了变化。因此,请务必确保在 appsettings.json 中正确设置 InstrumentationKey 和 ConnectionString。
{
"ApplicationInsights": {
"InstrumentationKey": "GUID",
"ConnectionString": "InstrumentationKey=GUID;IngestionEndpoint=https://<location>.in.applicationinsights.azure.com/"
}...
}
您可以在 Azure 门户中的 Application Insights 的概述边栏选项卡中找到 InstrumentationKey,也可以使用 azure cli
az monitor app-insights component show --app yourappinsightsname -g yourressourcegrouname --query instrumentationKey -o tsv
提示:如果您使用 Visual Studio(在我的例子中为 2022)连接 Application Insights,它会自动将 Application Insights 配置插入到您的 appsettings.json 中。如果您使用 appsettings.{env}.json 请确保您还需要更改它们。
所有这些都会导致
ApplicationInsights 在本地工作(在 appsetting.development.json 中设置时)应用图 - 正在工作实时指标 - 正在运行
希望它能像对我一样有所帮助!
关于azure - 当我在 App Insights 中打开实时指标时,为什么会收到 "Not available: your app is offline or using an older SDK'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66003480/
我正在使用下面的代码但收到警告, bool versionSupports = (@available(iOS 10, *)); @available does not guard availabil
我需要检查 Xamarin.iOS 中的 API 可用性 - 在 Objective-C 或 Swift 中我可以使用这些调用: if (@available(iOS 13, *)) 或 if #av
我遇到了一个我似乎不明白的奇怪问题。我正在制作一个从文件中读取数据的程序。但是当我读取数据时,我立即收到 EOFException。 所以我用 .available() 检查文件是否为空。我得到了一个
Swift 2.0 允许使用 @available 或 #available 进行可用性检查,但是使用 @available 和 有什么区别#可用? 最佳答案 您可以使用 if #available
我刚刚开始学习 angularjs 我尝试了这段代码:在文件 angularmy.js var myname = angular.module("myModule",[]); myname.contr
我有一个 USB 麦克风和扬声器适配器连接到 raspberry pi 3。我已经在 alsamixer 上设置了所有内容。我也设置了pcm.!default sysdefault:0在文件中 .as
import requests import time import csv import ast import sys import mysql.connector config = { 'user
我想让页脚的宽度与浏览器无关。 对于 Mozilla,我想使用 -moz-available 的值,当用户使用 Opera 时,那么 CSS 应该从 -webkit-fill-available 中获
如果您的代码需要仅在 macOS 10.12 或更高版本中可用的功能,但您希望您的代码也部署到更早的系统版本,您可以使用 @available在 Objective-C 中: if (@availab
我正在使用 Element Query允许在任何元素上使用 @media queries 的元素。这是它的处理方式: #foo:media(min-available-width:350px and
我正在尝试安装 oracle 19c,但在安装过程中遇到了与内存相关的问题“[INS-35179] 当前可用内存小于创建数据库所需的可用内存 (6,537MB)”。我仔细检查了所有先决条件,例如超过
我正在编写代码以使用此页面中的文档跟踪现场请求:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-bid-
我仔细阅读了 Kubernetes 文档 here关于扩展 imagefs.available 的默认 15%和其他参数,但没有说明如何设置,我已经安装了具有以下配置的 RKE(Rancher Kub
我想进入PAPI。我在Debian GNU/Linux上有5.3.2.0版。 papi_avail告诉我没有可用的硬件事件: $ papi_avail Available events and har
我目前正在构建一个混合云解决方案,需要将消息写入队列以供稍后处理。队列具有高可用性(99.999+% 的正常运行时间)是绝对必要的。 我的选择是将消息读/写到本地 ZeroMQ 高可用性对或 Azur
在 Mac OS X Leopard 中使用 Eclipse Helios 并调试调用 fsf gdb 7.1 的 C++ 代码,调试停止在 main 的第一行。然后在第一步之后我得到 No sour
无论如何,是否可以将 UIWebView 与针对 tvos 的应用程序一起使用?这个苹果文档,UIWebView Class Reference ,会建议否则不是吗?或者我只是解释错了? UIWebV
我想删除以下数据框中的“不可用”,但是当我使用以下代码将 Number 更改为数字时,“不可用”变为 4: c1 data 是一个 factor 列。 当您将一个因子直接转换为numeric 时,生成
PushKit 在 iOS 11 中提供了一种新方法,旨在取代 iOS 10 中的方法。 使用 iOS 11 作为基础 SDK 构建时无法使用 iOS 10 方法(我当前使用的是 Xcode 9.2B
不确定使用@rename 指令的所有方法。 我正在尝试重命名一个方法 @available(*, deprecated, renamed: "setValueInTable") public func
我是一名优秀的程序员,十分优秀!