Is every log entry stored when using Application Insights custom logs?

Mika Pitkänen 60 Reputation points
2024-10-03T05:39:02.46+00:00

We know that Application Insights is not meant for collecting audit log entries.

But there is one legacy web application that have used Application Insights for logging audit type events. The application has been logging into traces table.

We are wondering if changing those log events to be custom logs (logEvent) which will then end up to customEvents table, how well it can be assumed that every log entry would be stored?

This documentation

https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-custom-overview#design-limitations-and-considerations

says that "But if high cardinality is essential for your scenario, the aggregated metrics are probably not the right choice. Switch to using custom logs (that is, trackMetric API calls with trackEvent). However, consider that logs don't aggregate values, so every single entry will be stored."

https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics#trackevent

Or is it still possible that Application Insights could use sampling at some level (adaptive sampling, fixed-rate sampling or ingestion sampling) also for custom log events, so that not necessarily every log entry gets stored into Log Analytics workspace table?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,577 questions
0 comments No comments
{count} votes

Accepted answer
  1. Stanislav Zhelyazkov 27,476 Reputation points MVP
    2024-10-03T07:48:14.6566667+00:00

    Hi,

    You can check that customEvents table is not part of the sampling functionality by looking at the query to detect sampling. The query lists only tables requests, dependencies, pageViews, browserTimings, exceptions, traces.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.