You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a newly created app service where we have hosted a .Net Core 8.0 application. It has been hosted on Azure App service. I have configured the Instrumentation Key and the ApplicationInsights Connectionstring and provided the Instrumentation Key in appsettings.json.
When i created the app service , it was pointing to a diff app insight , but later I had to switch to a diff app insight.
I have updated the Keys & conn strings correctly in environment Variables & app settings.json
The probelm is few log statements are going to a diff app insight & very few log statements are going to teh current app insight.
Below if the Main block of the Program.cs
====================================================
public static void Main(string[] args)
{
TelemetryClient telemetryClient = new TelemetryClient();
telemetryClient.Context.GlobalProperties.Add("application", "APPLICATION-NAME");
telemetryClient.InstrumentationKey = Configuration.GetValue("InstrumentationKey");
I have a newly created app service where we have hosted a .Net Core 8.0 application. It has been hosted on Azure App service. I have configured the Instrumentation Key and the ApplicationInsights Connectionstring and provided the Instrumentation Key in appsettings.json.
When i created the app service , it was pointing to a diff app insight , but later I had to switch to a diff app insight.
I have updated the Keys & conn strings correctly in environment Variables & app settings.json
The probelm is few log statements are going to a diff app insight & very few log statements are going to teh current app insight.
Below if the Main block of the Program.cs
====================================================
public static void Main(string[] args)
{
TelemetryClient telemetryClient = new TelemetryClient();
telemetryClient.Context.GlobalProperties.Add("application", "APPLICATION-NAME");
telemetryClient.InstrumentationKey = Configuration.GetValue("InstrumentationKey");
=====================================================
And then I am injecting the Logger instance to my class/methods and using it
_logger.LogError("Error in method")
_logger.LogInformation("Log Info here")
Not sure why the logs are splitting to 2 app insight instances.
Any suggestions are appreciated to resolve it.
The text was updated successfully, but these errors were encountered: