- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在网上和SO上查找了这个问题的答案。我没有看到任何答案,所以想知道这是否可能。我想使用 log4j 并将 JSON 格式的日志数据发送到 azure 的服务 AppInsight。我可以在那里获取 json 数据,但它以原始文本形式出现。我已经看到可以在这个用例中使用遥测,但我不想搞乱它。我只想要 log4j 来处理我的日志记录。是否可以将 JSON 记录到 azure 的 AppInsight 并让它将其识别为 json,然后使其数据可查询?如果是这样,怎么办?
最佳答案
请原谅,这将是一个有点链接繁重,但你有不同的选择,具体取决于你想要做什么,所以我试图在此处包含尽可能多的信息。
最近对 Application Insights 功能及其与 Azure Monitor 的关系进行了一些相对较新的更改,以巩固和澄清服务的角色。大多数涵盖数据收集器 API 和跨资源日志查询等内容的 Application Insights 文档现在都会将您发送到 Azure Monitor。因此,一些 Application Insights 功能已停用:
https://azure.microsoft.com/en-us/blog/analyze-your-data-with-application-insights-analytics/
"The functionality described in this blog was retired and no longerexist in Application Insights. Alternatively, you can send yourcustom log to the Azure Monitor log store, which is LogAnalytics. You can query this data from Log Analytics or yourApplication Insights resource using cross-resource queries."
因此,对于您描述的场景,您需要使用 Azure Monitor。您仍然可以在 Application Insights 中导入 log4j 文件,并且如果您愿意,可以利用 Application Insights API 来获取自定义事件和指标:
如果您想了解更多信息,这里有一些有用的链接:
关于java - 如何使用 Log4j 将自定义属性记录到 AppInsight?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63421001/
我在 .NET CORE 2.0 项目上使用 Serilog 和 appinsights 编写日志。 我已经按如下方式配置了 SeriLog, var loggerConfiguration = ne
目前,我正在将自定义日志消息记录到 Azure 表中。 现在我需要根据日志类型自动触发发送电子邮件,还需要根据日志消息生成分析报告。 哪种服务更适合完成此任务? Azure Application I
我们正在考虑为我们的非 Web 应用程序实现 AppInsights。我们想要监视的事情之一是可能“挂起”超过 N 秒或分钟的进程。我一直找不到内置的东西可以做到这一点。我见过或想到的最接近的事情是记
背景 我有一个 Azure“应用服务”资源和一个链接的“Application Insights”资源。它们通过应用程序服务的 Settings -> Applications settings ->
我已将 Azure 应用程序洞察配置到我的 Web 应用程序。我添加了如下代码。 catch (Exception serverEx) {
我们正在使用“Microsoft.ApplicationInsights 2.1.0.0”并安装了 appinsight block 包。已经配置的应用程序。我可以看到页面 View 、服务器请求和失
我的系统的一些常规设置: Windows x64 .net 3.1 AspNet.Core Serilog + AppInsights 编写器 最近,我们开始观察许多如下所示的跟踪日志。我认为当我们尝
有没有办法控制发送到 AppInsights 跟踪的数据。正如官方文档所述,过滤和预处理是可行的方法。我无法从 POST 和 PUT 中获取属性(密码)。由于密码很敏感,我不想被发送到 App Ins
我正在努力创建 AppInsight 查询... 我想获取应用程序启动的次数,并将其除以触发特定事件的次数(拼写检查器)。 实际上,我有 3 个应用程序,它们都使用相同的拼写检查功能,我想看看每个应用
如何制作包含单个指标的单个图 block 1x1? 仪表板附带的一些默认图 block 显示单个指标,例如用户计数。我如何制作自己的指标? 例如,异常(exception)情况的数量? 类似这样的吗?
我的 kusto 查询有问题。此 kusto 查询在警报调用内运行。我尝试通过电子邮件向我们的客户发送通知。 场景: 我尝试在周六上午 7 点到 13 点之间发送消息。 (仅限周六)但周日我也会收到消
在 Asp.net Core 版本 3.1 中,我尝试将 LogInformation 记录到 Application Insights,但它没有登录到 App Insight。 private re
我一直在尝试使用 Log4Net 而不是默认的 api 遥测客户端在 Azure AppInsights 中写入日志(跟踪、信息和异常)。当我从 VS2013 运行应用程序时,我既没有收到任何错误消息
我有一个由 3 个网络项目组成的解决方案: 1 - MVC应用程序用作 auth/STS 2 - Web Api 2应用程序 3 - MVC app(主站点)用于加载 Angular 应用程序。 我已
我们已经在 Azure 中配置了 APIM、WebApp,然后连接了 AppInsights Log 以在出现故障时获取详细信息。 我们正在 APIM 上进行负载测试。 有一次,我们开始收到 500
我的 kusto 查询有问题。此 kusto 查询在警报调用内运行。我尝试通过电子邮件向我们的客户发送通知。 场景: 我尝试在周六上午 7 点到 13 点之间发送消息。 (仅限周六)但周日我也会收到消
在 Asp.net Core 版本 3.1 中,我尝试将 LogInformation 记录到 Application Insights,但它没有登录到 App Insight。 private re
我一直在尝试使用 Log4Net 而不是默认的 api 遥测客户端在 Azure AppInsights 中写入日志(跟踪、信息和异常)。当我从 VS2013 运行应用程序时,我既没有收到任何错误消息
我有一个由 3 个网络项目组成的解决方案: 1 - MVC应用程序用作 auth/STS 2 - Web Api 2应用程序 3 - MVC app(主站点)用于加载 Angular 应用程序。 我已
我们已经在 Azure 中配置了 APIM、WebApp,然后连接了 AppInsights Log 以在出现故障时获取详细信息。 我们正在 APIM 上进行负载测试。 有一次,我们开始收到 500
我是一名优秀的程序员,十分优秀!