App Insights遥测离线时不发送

Mat*_*ble 6 c# wpf azure telemetry azure-application-insights

我正在使用应用程序见解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>
Run Code Online (Sandbox Code Playgroud)

问题是,当我运行已安装的应用程序并且处于离线状态时,遥测器被捕获得很好.下次我在线时打开应用程序,数据最终会被推送到应用洞察.但是,当其他任何人离线运行应用程序时,他们的数据永远不会在他们重新上线时被推送到应用程序洞察.

这个配置的方式有什么不对吗?为什么这对某些用户有效而对其他用户无效?

编辑:今天与用户合作我注意到当他们离线并运行应用程序时,没有保存的临时文件.当我在计算机上执行相同操作时,我注意到创建了一个奇怪的临时文件.当我在重新联机时运行应用程序时,它会消失.

Mat*_*ble 7

在用户机器上调试并挖掘代码之后我发现的是服务器遥测通道使用此功能NetworkInterface.GetIsNetworkAvailable();,即使在离线时它们总是为我的用户返回true,因为他们有一些额外的网络适配器,认为它们连接到未知的网络.