Azure功能 - 如何获得应用程序见解以不记录可用性测试结果

发布于 2025-02-13 11:58:09 字数 275 浏览 0 评论 0原文

我有一个Azure功能,该功能暴露了一个用于检查可用性的端点。

应用程序Insights每次检查时都会记录此可用性测试的结果。

我想进行可用性测试,但我不希望我的应用程序见解显示这些日志。如何将这些可用性测试从我的应用程序见解中排除?

更好的是 - 我希望AI实际上只记录失败 - 我该怎么做?

我知道Itelemetryprocessor-这适用于ASP.NET核心应用程序 - 但是对于Azure功能,该方法是什么?

这是.NET 3.1 Azure函数应用程序

I have an azure function which exposes an endpoint that I use for checking the availability.

Application insights logs the results of this availability test every time it does a check.

I would like to have the availability tests, but I don't want my application insights to show these logs. How can I exclude these availability tests from my application insights?

Better still - I would like AI to actually just log the failures - how could I go about this?

I know about ITelemetryProcessor - and this works for ASP.Net Core apps - but for azure functions what is the approach?

This is a .Net 3.1 azure function app

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花开柳相依 2025-02-20 11:58:09

我知道ItelemetryProcessor-这适用于ASP.NET核心

应用程序 - 但是对于Azure功能,该方法是什么?

您可以使用URL PING测试使用监视器可用性。

设置

  1. 从监视部分

    ,选择诊断设置,然后添加诊断设置。
    “在此处输入图像说明”

  2. 在诊断设置下,选择类别详细信息和日志,请选择功能应用程序。
    “在此处输入图像说明”

  3. 在这里您可以为特定结果运行查询。
    “在此处输入图像说明”

有关更多信息,请访问使用URL PING测试的监视可用性

您可以在调查中看到的另一种方式。
“在此处输入图像描述”

,您也可以创建并运行自定义可用性测试Azure功能由Microsoft文档。

I know about ITelemetryProcessor - and this works for ASP.Net Core

apps - but for azure functions what is the approach?

You can use Monitor availability with URL ping tests.

Setting up

  1. From the Monitoring section, select Diagnostic settings and then add Diagnostic settings.
    enter image description here

  2. Under Diagnostics Settings, select category details and log, choose functionApplogs.
    enter image description here

  3. Here you can run a query for a specific result.
    enter image description here

For more information read these Microsoft documents on Monitor availability with URL ping tests

another way you can see in availability under Investigate.
enter image description here

and you can also Create and run custom availability tests using Azure Functions by Microsoft Documents.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文