从C#中的Azure应用程序洞察检索日志

发布于 2025-02-11 19:52:24 字数 340 浏览 1 评论 0原文

我需要从C#中的Azure应用程序见解中检索日志(痕迹,异常,请求)。为此,我必须使用应用Insights提供的API。我在此博客中找到了在此处输入链接说明使用Microsoft.azure.applicationinsights的软件包进行操作的一种方法,但已弃用。其他替代方案? 提前致谢。

I need to retrieve logs (traces, exceptions, requests) from azure application insights in c#. For that I have to use the API provided by App insights. I found in this blog enter link description here a way to do that using the package Microsoft.Azure.ApplicationInsights but it's deprecated. Other alternatives for that?
Thanks in advance.

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

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

发布评论

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

评论(1

我只土不豪 2025-02-18 19:52:24

谢谢 @deepdave-mt,是的,microsoft.azure.applicationinsights已弃用,并且有新版本发布 Nuget Gallery | microsoft.azure.applicationinsights.query 1.0.0

根据 Microsoft-pocumentation 它说,

您可以使用 microsoft.extensions.logging.applicationinsights
您可以使用Ilogger和遥测使用应用程序见解来记录


参考:

c# - https://www.nuget.org/packages/packages/packages/packages/microsoft.azure.applicationinsightsights/- stack Overflow

://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-trace-lace-lace-lace-'r =“ nofollow noreferrer”> https://learn.microsoft.com/en-en-us/ azure/azure-monitor/app/asp-net-trace-logs

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