【问题标题】:Alternative to https://www.nuget.org/packages/Microsoft.Azure.ApplicationInsights/替代 https://www.nuget.org/packages/Microsoft.Azure.ApplicationInsights/
【发布时间】:2021-01-13 23:01:26
【问题描述】:

我一直在使用这个库从 Azure (https://www.nuget.org/packages/Microsoft.Azure.ApplicationInsights/) 获取 ApplicationInsights 数据,但它只是一个预览库,并且有点过时(最后更新时间为 2018 年 4 月 19 日)。

我正在使用与我的 ApplicationInsights 数据关联的 AD 角色以允许使用它 - 这很有效 - 但我想使用更现代/受支持的包。是否有我丢失的此包的更新版本或隐藏在主 ApplicationInsights nuget 包中的 ApplicationInsightsDataClient 的替代品(我真的不想构建自己的 REST 包装器,因为我确定这是 Microsoft 或其他人已经做过的事情吗?

谢谢!

【问题讨论】:

    标签: c# azure .net-core azure-application-insights


    【解决方案1】:

    编辑(2021 年 10 月)

    新库是released by Microsoft,所以当前答案是Azure.Monitor.Query

    旧答案

    支持Microsoft.Azure.ApplicationInsights.Query包,今天刚刚发布了新的预览版。

    看起来您正在使用的那个包应该被弃用,但我看到它仍然与Application Insights REST API documentation 链接,不确定联系 Microsoft 以修复它的最佳方式是什么。

    编辑:现在一切似乎都已修复。 Microsoft.Azure.ApplicationInsights 包在 nuget.org 上已弃用,建议的替代方案是 Microsoft.Azure.ApplicationInsights.Query,文档指向正确的包。

    【讨论】:

    • 这很有趣,之前的版本也是 2018 年发布的……我猜它是因为 .net 5 预览版中的重大变化而更新的。令人讨厌的是,ApplicationInsights 包包含一个错误,即不返回自定义事件指标,因此即使该库也不适合目的:-(
    • @gplumb 如果您不报告错误,它们就不会得到修复。 github.com/Azure/azure-sdk-for-net/issues
    • @IanKemp 我很感激,已经提交了一张票。
    • @gplumb 不,它不是内部依赖。它具有与 Microsoft.Azure.ApplicationInsights 大致相同的 API,我无需进行太多更改即可切换代码。看起来这一切都是源代码在存储库之间移动的结果。代码被移动并以新名称发布了新版本,但版本号相同:github.com/Azure/azure-sdk-for-net/tree/master/sdk/…
    • 啊(和 urgh!):-) 我现在已经使用另一个库拼凑了一些东西。我会更新github票
    猜你喜欢
    • 2021-05-08
    • 1970-01-01
    • 1970-01-01
    • 2022-10-23
    • 1970-01-01
    • 2022-10-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多