【问题标题】:How to corelate the UserId and User_Id from AppCenter如何关联 App Center 中的 UserId 和 User_Id
【发布时间】:2020-10-31 11:01:02
【问题描述】:

有没有办法通过nuget获取AppCenter生成的User_Id?

基于此comment,AppCenter 中有两种类型的用户 ID。带有 SetUser 的那个,我已经在使用了,但是在 AppInsights 中导出数据之后,看起来查询正在使用 AppCenter 生成的那个完成。为了检索与我的 userId 相关的分析,我想连接这两者,但我找不到通过 AppCenter nuget 检索生成的 user_id 的任何信息/方式。

【问题讨论】:

  • App Center SDK支持设置用户ID(AppCenter.setUserId("your-user-id");),用于扩充崩溃报告。设置用户ID后,您可以使用应用中心的搜索功能搜索相关的具体崩溃报告用ID。你可以看看Identify users
  • 是的,我知道那部分,但正如 git 的评论所说,AppCenter 中有两个用户 ID。我可以通过您的方法设置的一个,以及由他们生成的一个。我想要实现的是连接这两者,因为我看到有一些崩溃/日志以某种方式没有到达 setUserId,但它们具有 AppCenter 生成的 Id。这样我就可以找到与一个用户相关的所有日志。不知道我是否能够很好地解释它,请问有什么不清楚的地方。
  • 啊,再次浏览您的链接,我认为我正在谈论的 id 就是这个。但是它的 InstallId 是否与来自 github 的评论中的用户 ID 相同? docs.microsoft.com/en-us/appcenter/sdk/other-apis/…
  • 它们不一样,userid 是一个可选字符串,用于将日志与用户关联起来。Install-ID 是您每次使用 App Center SDK 安装应用程序时生成的一个新的唯一安装标识符。此 ID 用于区分数据和唯一设备。 App Center 服务需要 ID 才能正常运行。
  • 我们说的不是我感觉的同一件事 :( 在 AppInsights 中从 AppCenter 导出数据后,有 2 个用户 ID(如问题本身中 git 的链接所述)。一个是在自定义事件属性中,另一个在自定义属性中。自定义属性中的一个是可选的,并且是通过 AppCenter.SetUserId 设置的。我在问如何获得自定义事件属性中的那个和我认为现在它实际上是 Install-ID。

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


【解决方案1】:

经过对该主题的更多搜索和调查,我发现这是 AppCenter 的 Analytics 日志的一个已知问题。为了绕过它,您可以使用 CustomProperties 字段,然后查询该字段,例如 here

如果您不想再点击一个链接,查询如下所示:

customEvents
| extend properties = todynamic(tostring(customDimensions.Properties))
| extend userID = tostring(properties.UserID) // assuming you named the property UserID on the client side
| where isnotempty(userID) // this will be empty if you haven't set it as a property in the SDK

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-31
    • 1970-01-01
    • 1970-01-01
    • 2015-10-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多