我正在将应用程序洞察 sdk 用于我一直致力于捕获一些简单遥测的 wpf 应用程序。我正在加载如下所示的配置文件<?xml version="1.0" encoding="utf-8"?><ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings"><TelemetryChannel Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel, Microsoft.AI.ServerTelemetryChannel"/><TelemetryProcessors> <Add Type="Microsoft.ApplicationInsights.Extensibility.AutocollectedMetricsExtractor, Microsoft.ApplicationInsights"/> <Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel"> <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond> <ExcludedTypes>Event</ExcludedTypes> </Add> <Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel"> <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond> <IncludedTypes>Event</IncludedTypes> </Add></TelemetryProcessors>问题是,当我运行已安装的应用程序并且处于脱机状态时,可以很好地捕获遥测。下次当我在线时打开该应用程序时,该数据最终将被推送到应用程序洞察力中。但是,当其他任何人离线运行该应用程序时,他们的数据再回到联机状态也永远不会被推送到应用程序见解中。这里的配置方式有什么问题吗?为什么这对某些用户有效,但对其他用户无效?编辑:今天与用户一起工作时,我注意到当他们脱机并运行该应用程序时,不会保存任何临时文件。当我在计算机上执行相同的操作时,我注意到创建了一个奇怪的临时文件。当我重新上线时运行该应用程序时,它消失了。
2 回答
杨魅力
TA贡献1811条经验 获得超6个赞
在用户的机器上进行调试并仔细研究代码后,我发现服务器遥测通道使用此功能NetworkInterface.GetIsNetworkAvailable();
,即使用户处于脱机状态,该遥测通道也始终为我的用户返回true,因为他们有一些额外的网络适配器认为他们已连接到未知的网络。
qq_笑_17
TA贡献1818条经验 获得超7个赞
您是否检查过https://docs.microsoft.com/zh-cn/azure/application-insights/app-insights-asp-net-troubleshoot-no-data或尝试使用其他计算机运行您的应用程序?看起来可能是防火墙问题或类似问题。
- 2 回答
- 0 关注
- 209 浏览
添加回答
举报
0/150
提交
取消