1
votes

Recently to find Production issues, I used Application insight and created logs using Telemetry Trace. So, I'm using currently two separate keys one for Dev and one for SIT environment. randomly few logs were missing, I’m not sure what is the issue, no errors.

We just want to log some information and exceptions. No need of request or performance related stuff.

From past three days, at least some part of the logs are missing in between randomly, no errors found. In dev and SIT , concurrent users will hit the APIs. Please suggest do I need to change any configuration.

In Config file I commented Perfcounter part.

And increased MaxTelemetryItemsPerSecond to 200.

Using Adaptive sampling. And Telemetry client for logging, sample code: telemetry.TrackTrace("", properties) - no severity level mentioned.

Our Application is .NET application, Web API , framework 4.7.

1
can you show us the Adaptive sampling settings in the config file? including the IncludedTypes and ExcludedTypes.Ivan Yang
<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel"> <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond> <ExcludedTypes>Event;Request;Dependency</ExcludedTypes> </Add> <Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel"> <MaxTelemetryItemsPerSecond>200</MaxTelemetryItemsPerSecond> <IncludedTypes>Trace;Exception;</IncludedTypes> </Add>MadhaviTix
I have not changed other partMadhaviTix
If it happens randomly, please remove the Trace from <IncludedTypes>, then the Trace will not be sampled.Ivan Yang
OK, thank you. I will try.MadhaviTix

1 Answers

0
votes

One possible reason is that you have added the Trace in <IncludedTypes></IncludedTypes> in the config file. Please remove the Trace from there, then the Trace telemetry data will not be sampled.