Is there any way/trick/workaround to reduce Azure Application Insight cost? I have a very large volume of data (around 20M) ingestion every day. Data sampling set 5%, Even after Daily 5GB of data ingestion in Application Insights.
Application Insights has 90 days default retention period, but I don't need data even after 7 days.
Note: I'm only sending Info logs in application Insights with minimal information.
Few points I want to add here which help me.
Review logging and log data in correct category. (Verbose, Info, Error etc). Most of the time (verbose only for debugging) am using Info and Error log only.
Combined multiple lines of logs in a single line. It will reduce system-generated columns data.
Old
log.Info($"SerialNumber :" serialNumber)
log.Info($"id :" id)
log.Info($"name :" name)
New
log.Info($"SerialNumber, id, name :" serialNumber + id + name);
Check traces
collection customDimensions
. For me, a lot of system-generated data was there like thread name, logger name and class name. I did some changes in my logger, now my customDimensions
column is empty.
Reduce some system-generated logs
{ "logger": { "categoryFilter": { "defaultLevel": "Information", "categoryLevels": { "Host": "Error", "Function": "Error", "Host.Aggregator": "Information" } } } }
All the above points help me to reduce log data, hope it will help others.
You can do more aggressive sampling. Also review what "info logs" are being sent. Perhaps you can live without sending many of them. Also review all the auto-collected telemetry -if there is something you dont care about - (eg: perf counters), remove them. Also check this Msdn blog authored by application insights team members: https://msdn.microsoft.com/magazine/mt808502.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With