自定义 AppInsights 仪表板 - 显示日志查询
Customize AppInsights dashboard - show log query
我们有一个 Office COM 加载项,我们想使用 AppInsights 捕获遥测数据。我们目前正在分析可行性。
我们尝试的第一项是捕获主机版本。
我们的原型向 AppInsights 发送一个 JSON 对象。 JSON 看起来像
{
"Office":{"Version":"365","Build":"13530.201011"}}
}
并将其作为跟踪发送到 AppInsights(一次调用 telemetryClient.TrackTrace);
这样我们就可以根据需要轻松添加有关主机应用程序的更多信息,例如它是 32 位还是 64 位。
分析数据也很简单,下面的Kusto查询很容易提取出我们需要的:
traces
| extend environment=parse_json( message )
| extend officeVersion = tostring( environment.Office.Version )
| summarize cnt = cnt() by officeVersion
| project officeVersion, cnt
我们想将此 Kusto 查询固定到 AppInsights 仪表板。
我们该怎么做?
请尝试日志查询屏幕中的“固定到仪表板”按钮。请注意,您应该先 运行 查询,然后才会启用按钮:
我们有一个 Office COM 加载项,我们想使用 AppInsights 捕获遥测数据。我们目前正在分析可行性。 我们尝试的第一项是捕获主机版本。 我们的原型向 AppInsights 发送一个 JSON 对象。 JSON 看起来像
{
"Office":{"Version":"365","Build":"13530.201011"}}
}
并将其作为跟踪发送到 AppInsights(一次调用 telemetryClient.TrackTrace);
这样我们就可以根据需要轻松添加有关主机应用程序的更多信息,例如它是 32 位还是 64 位。 分析数据也很简单,下面的Kusto查询很容易提取出我们需要的:
traces
| extend environment=parse_json( message )
| extend officeVersion = tostring( environment.Office.Version )
| summarize cnt = cnt() by officeVersion
| project officeVersion, cnt
我们想将此 Kusto 查询固定到 AppInsights 仪表板。 我们该怎么做?
请尝试日志查询屏幕中的“固定到仪表板”按钮。请注意,您应该先 运行 查询,然后才会启用按钮: