简体   繁体   English

App Insights:遥测未显示使用情况用户数据

[英]App Insights: Telemetry not showing Usage User data

I have my.Net Core app and I've added ITelemetryInitializer and got that all set up.我有我的 .Net Core 应用程序,我添加了 ITelemetryInitializer 并完成了所有设置。 In Application Insights for that app, under Performance => Operation Name => Samples => Suggested => Request Properties -> Show All => "Auth Id" and "Account Id" have values now, great.在该应用的 Application Insights 中,Performance => Operation Name => Samples => Suggested => Request Properties -> Show All => “Auth Id”和“Account Id”现在有了值,太棒了。

Now, in Application Insights => Usage -> Users, I still only have 1 User.现在,在 Application Insights => Usage -> Users 中,我仍然只有 1 个用户。 How do I get the Usage/Users functionality to read the User information that the requests under performance are collecting?我如何获得使用/用户功能来读取正在执行的请求正在收集的用户信息?

I've read several of MSFT documentation on Send User Context and troubleshooting , etc, but no luck.我已经阅读了一些关于Send User Contexttroubleshooting等的 MSFT 文档,但没有成功。 It seems like if I have "anonymous user ID, authenticated user ID, or session ID" in the Request Properties, the Usage telemetry should be picking it up.似乎如果我在请求属性中有“匿名用户 ID、经过身份验证的用户 ID 或 session ID”,则使用遥测应该会拾取它。

Any suggestions?有什么建议么?

Here is a link that talks about how to resolve the one user/session issue: 这是一个讨论如何解决一个用户/会话问题的链接:

https://docs.microsoft.com/en-us/azure/azure-monitor/app/usage-troubleshoot#counting-users https://docs.microsoft.com/zh-CN/azure/azure-monitor/app/usage-troubleshoot#counting-users

Here is a code snippet that can be used for ASP.Net Core apps: 以下是可用于ASP.Net Core应用程序的代码段:

https://github.com/MicrosoftDocs/azure-docs/issues/16002#issuecomment-503655010 https://github.com/MicrosoftDocs/azure-docs/issues/16002#issuecomment-503655010

From Counting users :来自计数用户

If your app is sending authenticated user IDs, you can count based on authenticated user IDs in the users tool.如果您的应用程序发送经过身份验证的用户 ID,您可以在用户工具中根据经过身份验证的用户 ID 进行计数。 In the Show dropdown, choose Authenticated users.在显示下拉列表中,选择经过身份验证的用户。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM