Tag Archives: TelemetryClient

C# Azure TelemetryClient will leak memory if not implemented as a singleton

I noticed that my classic .net web application would leak memory after I implemented metrics for some background tasks. Further investigation showed that my MetricAggregationManager would not release its memory. Since one of the major changes was the implementation of … Continue reading

Posted in .net, .NET Core, c#, General .NET, Microsoft Azure | Tagged , , , | Leave a comment

Application Insights not working in .NET Core Console Application – Remember to flush the TelemetryClient

My .NET Core console application did not write to my Application Insights instance. Well, it did, but only sometimes. Writing to Application Insights is done asynchronously, usually every 30 seconds or 500 items. This means that you need to give … Continue reading

Posted in .NET Core, Microsoft Azure | Tagged , , | Leave a comment

Azure ApplicationInsights track custom metrics using the TelemetryClient

The Microsoft.ApplicationInsights nuget package is your code gateway to the Microsoft Application Insights portal, and also to the Azure Monitor universe. You use these tools as a shared place for your log data, telemetry, alerts, diagnostics etc. The Application Insights comes … Continue reading

Posted in .net, c#, Microsoft Azure | Tagged , , , , | 3 Comments