【问题标题】:Should i use Application Insights or AppCenter Diagnostics for Cordova Apps我应该为 Cordova 应用程序使用 Application Insights 还是 AppCenter 诊断程序
【发布时间】:2019-08-02 15:10:14
【问题描述】:

Application Insights 和 AppCenter Diagnostics 都允许通过以下链接监控 Cordova 应用程序:

https://github.com/Microsoft/cordova-plugin-ms-appinsights

https://docs.microsoft.com/de-de/appcenter/sdk/getting-started/cordova

鉴于 GitHub Repo 有点过时,我想 AppCenter 现在是监控应用程序的建议方法。 但是,在后端使用 Azure 服务时,AppCenter 不提供端到端监控功能。

  • 那么,在决定为我们的 Cordova 应用程序使用哪个监控系统时,我们应该基于以下问题做出决定吗?

    1. 在后端使用带有 AppInsights 的 Azure 服务? -> 使用 Cordova 前端的 Application Insights。

    2. 拥有独立应用程序或没有 Azure 后端 -> 使用 AppCenter 诊断。

  • 还有其他需要考虑的因素吗?

  • AppCenter 诊断是否提供了我无法从 AppInsights 获得的任何其他好处?

PS:我知道将 AppCenter 诊断数据发送到 AppInsights 的可能性,但这只是数据导出,缺乏端到端功能。

【问题讨论】:

  • (来自 Application Insights 团队)官方不支持引用的 GitHub 存储库(版本 0.0.2 是另一个指向它的指针)。虽然它可能只是工作。
  • @ZakiMa 感谢您的反馈。那么有没有计划将 Application Insights 的使用场景也扩展到应用程序?我们是否应该坚持 AppCenter 对应用程序的有限功能?只是想为我们的开发人员提供指导,以便在不同的应用程序类型中进行监控。
  • 将此线程转发给 App Insights 使用团队。他们应该尽快做出回应并提供指导。
  • @ZakiMa 对此有何更新?
  • 这可能是一个非常基于意见的问题,所以我不确定为什么还没有人关闭它。我也转发给了 AppCenter 团队。但我也在下面添加了我的意见答案。

标签: cordova azure-application-insights visual-studio-app-center


【解决方案1】:

总的来说,我认为指导是“如果是移动应用,请使用 AppCenter”。
然后,您可以设置该 AppCenter 应用以导出到应用洞察:

https://blog.xamarin.com/appcenter-continuous-export-application-insights/

通过这种方式,您可以获得 appcenter 的设备支持/其他功能,并且您可以在相同的数据上获得应用程序洞察力的工具/功能/等。如果您已经将应用程序洞察力用于服务器端遥测,这将特别有用。

【讨论】:

  • 感谢您的评论。但是,导出 AppCenter 的诊断信息并没有提供这两种功能。它只是将数据导出到 AppInsights 以允许在同一个地方分析数据,但它缺乏 AppInsights 给我的方式的端到端请求相关性。我必须自己关联数据。这就是为什么这不是意见问题。
  • 如果是这种情况,那么您需要与 appcenter 团队合作,以确保他们设置或允许 正确设置 operationIds 和其他相关值,以便它可以那样工作。
  • 我开始使用 AppCenter 从我的移动应用程序发送自定义事件,但我很快就遇到了“跟踪”features 的限制:事件名称的长度为 256 个字符(没关系);每个事件的属性值长度为 125 个字符,而 Insights trace 消息可以容纳更多数据。对于移动应用程序,可能不需要发送大负载,但我发现 AppCenter 消息大小限制很低。
【解决方案2】:

有这个 JavaScript SDK Github official link herehttps://github.com/microsoft/ApplicationInsights-JS

这有助于任何 JS 应用程序(无论是 React、Angular 还是 Vue)直接将洞察记录到 AppInsights

【讨论】:

    猜你喜欢
    • 2020-08-02
    • 1970-01-01
    • 1970-01-01
    • 2013-02-16
    • 1970-01-01
    • 2016-10-22
    • 1970-01-01
    • 1970-01-01
    • 2010-10-25
    相关资源
    最近更新 更多