Skip to content

not saving temp file in offline scenario for some users #796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
matttabor opened this issue May 6, 2018 · 5 comments
Closed

not saving temp file in offline scenario for some users #796

matttabor opened this issue May 6, 2018 · 5 comments

Comments

@matttabor
Copy link

matttabor commented May 6, 2018

If you are reporting bug/issue, please provide detailed Repro instructions.

Repro Steps

I'm using the SDK to send some basic application tracking data for a wpf app. I'm using the server telemetry channel to handle cases where users are not connected to the interwebs. Testing the app it works for me just fine, but when users test this for me they never see the telemetry captured offline get pushed to app insights. When I run through the app when I'm offline I see a temp file get created in my storage folder as expected. When I come back online and open the app that file goes away as expected. But trying the same thing on users computer's the file isn't getting created - so data captured when user is offline is just getting lost.

From my applicationinsights.config file

`<TelemetryChannel Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel, Microsoft.AI.ServerTelemetryChannel">
	<StorageFolder>c:\temp</StorageFolder>
</TelemetryChannel>`

I've asked the user to make sure they've created the folder and given write access, but still doesn't seem to work.

Actual Behavior

No temp file is saved in offline scenarios and therefore no offline data is captured.

Expected Behavior

temp file should get saved in the storage folder I specified and when user comes back online they should and runs the application again they should see that data pushed out to app insights

Version Info

SDK Version : 2.5.1
.NET Version : 4.5
OS : windows 10

@matttabor
Copy link
Author

matttabor commented May 7, 2018

Working with my users here it looks like the call to NetworkInterface.GetIsNetworkAvailable(); in Network.cs is returning incorrectly. It returns true for them even though they are not connected to a network. But is the intent of this to check if user is connected to the internet not if they are just connected to a network?

@lmolkova
Copy link
Member

We have similar (perhaps the same) issue reported via ICM ticket with some details there.
There is a virtual network adapter without internet access so GetIsNetworkAvailable does not correctly identify the network state.

It is likely that channel does not receive any response from the backend, as it was using a virtual network adapter to send transmission.

From the logs, I see that couple of transmissions were started but never finished (perhaps finished with timeout after trace collection was finished).

As we've never got any response, this branch of ErrorHandlingTransmissionPolicy is executed: https://github.com/Microsoft/ApplicationInsights-dotnet/blob/7850e43cd17972b8be7114b4adf54ba2004a6a3d/src/ServerTelemetryChannel/Implementation/ErrorHandlingTransmissionPolicy.cs#L87, so we don't send any telemetry to the backend.

As timeouts/cancellations is a valid and transient issue, we should test this cases and find the proper retry policy.

@lmolkova lmolkova added the bug label May 16, 2018
@lmolkova lmolkova added this to the 2.7 milestone May 16, 2018
@Hammatt
Copy link
Contributor

Hammatt commented Jul 1, 2018

I'm seeing this issue too when integrating application insights into our azure iot edge modules. Is there any kind of ETA for this issue being fixed?

@cijothomas
Copy link
Contributor

The latest 2.10.0-beta4 should address this issue. Please try it and let us know if this still repros.

@github-actions
Copy link

This issue is stale because it has been open 300 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants