Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

ApplicationInsightsTraceListener does not respect Flush #67

Closed
markanewman opened this issue Jan 25, 2017 · 2 comments
Closed

ApplicationInsightsTraceListener does not respect Flush #67

markanewman opened this issue Jan 25, 2017 · 2 comments

Comments

@markanewman
Copy link

When calling Trace.Flush(), some of the last messages may be lost. Per this, TelemetryClient.Flush needs to be called to make sure the last batch is sent.

@kavanj
Copy link

kavanj commented Jan 25, 2017

A similar issue exists in ApplicationInsightsAppender (Log4NetAppender).
ApplicationInsightsAppender doesn't override AppenderSkeleton.Flush(), so calling Flush just hits AppenderSkeleton.Flush().

I haven't experimented with ApplicationInsightsTarget (NLogTarget), but I'd expect the same issue to exist there, since there doesn't appear to be anything calling TelemetryClient.Flush()

@markanewman markanewman mentioned this issue Jan 25, 2017
@markanewman
Copy link
Author

I am not familiar with NLog, but I looked for AppenderSkeleton.Flush() before I put in my PR and was unable to find it. The version that is referenced doesn't implement the IFlushable interface in the latest code. To my eye, this seems to be the issue with #68.

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

No branches or pull requests

4 participants