如何查看聊天机器人用户在Azure门户的AppInsights中的数量

时间:2018-10-22 13:08:14

标签: node.js azure botframework

我已经使用Azure门户中的node js开发了一个聊天机器人,我想查看在门户中访问我的聊天机器人的用户总数

感谢您的帮助

1 个答案:

答案 0 :(得分:0)

访问Application Insights >>概述中的 Analytics 部分。在这里,您可以编写查询以获取与应用程序/机器人相关的数据。

此查询返回每个频道的用户数。 您应该根据自己的喜好调整时间(不要忘记时区),或者将其全部删除以使用应用程序的时间范围。

customEvents
| where timestamp > todatetime('2018-10-01T15:30:00.000Z')
| where timestamp < todatetime('2018-10-23T15:30:00.000Z')
| where name == 'MBFEvent.UserMessage' 
| summarize dcount(tostring(customDimensions.conversationId)) by tostring(customDimensions.channel)

以下是查询的输出 enter image description here

您可以使用

调整跨渠道的总用户数的查询
| summarize dcount(tostring(customDimensions.conversationId))

在机器人注册页面的 Analytics 部分中也可以找到相同的信息(下图显示了不同日期范围内的数据)

enter image description here

您可以尝试在“机器人注册”页面的“分析”部分中更改日期范围,并在查询中使用相同的日期范围来验证用户数。

enter image description here