ApplicationInsights-dotnet icon indicating copy to clipboard operation
ApplicationInsights-dotnet copied to clipboard

Provide FlushAsync in ServerTelemetryChannel

Open cesarblum opened this issue 9 years ago • 5 comments

I'm not sure why that class doesn't expose a FlushAsync() method. Please explain if there's a rationale for that.

We've recently dealt with a customer issue where their service's performance was severely degraded due to calls to ServerTelemetryChannel.Flush() blocking their threads. Ideally they should be able to call an async method and not block when flushing.

cesarblum avatar Mar 23 '17 21:03 cesarblum

👀

muratg avatar Mar 23 '17 21:03 muratg

Hi @cijothomas ,

do we need manual code for tracking the exception for application insights ?

client.TrackException(new Exception("Demo exception.")); client.TrackTrace("Demo application exiting.");

do we have any configuration to track the exception across the console application ?

pandianrb avatar Jan 09 '18 12:01 pandianrb

This should be the API:

Task FlushAsync(CancellationToken);

You can await it, Wait it or cancel it.

paulomorgado avatar Mar 07 '19 16:03 paulomorgado

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.

github-actions[bot] avatar Jan 04 '22 00:01 github-actions[bot]

For what it's worth, I faced this issue today and it made me decide to not use NLog in my project altogether.

PawelAdamczuk avatar Nov 09 '23 10:11 PawelAdamczuk