Azure Application Insight all events not being logged- C#
static void Main(string[] args)
{
AzureHelper.LogEvent("Event1");//Static Method, logging Event1
AzureHelper.LogEvent("Event2");//Static Method, logging Event2
UpdateInformation();//Static Method working
AzureHelper.LogEvent("Event3");//Not being logged
}
//Azure Helper class
public static void LogEvent(string data)
{
try
{
telemetryClient.TrackEvent(data);
}
catch (Exception e)
{
Console.WriteLine("Exception in AppInsight" + e.Message);
}
}
I tried logging the event within the UpdateInformation() as well, there also its not working. I feel like after UpdateInformation(), appinsight is losing context.
New contributor
abhay kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.