I am tracking metrics using App Insights .NET SDK Metric.TrackValue. I want to retain these customMetrics records as long as possible.
The doc seems to say they are thrown away after 90 days, _even if_ I request 730 days retention.
Is that correct? Any workaround?
Quoting How long is the data kept?
Raw data points (that is, items that you can query in Analytics and inspect in Search) are kept for up to 730 days ...
Aggregated data (that is, counts, averages and other statistical data that you see in Metric Explorer) are retained at a grain of 1 minute for 90 days
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@ishepherd , Thanks for brining this to our attention. We will investigate it further and update you shortly.
I believe the raw telemetry from Metric.Trackvalue() would still be retained for 730 days within the customMetrics table of the Log Analytics query experience if you set your retention settings to 730 days. The loss of aggregation data should only impact the Metrics Explorer experience within the UI.
Let me ping a few folks internally to confirm.
@DaleKoetke or @vgorbenko would you be able to confirm the retention behavior for custom metrics within App Insights?
@mrbullwinkle - Thank you for providing your insights.
@ishepherd - I hope @mrbullwinkle has answered your question. At this moment, Since there is no doc update required, We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue. Meanwhile, @DaleKoetke or @vgorbenko can respond to the thread.
@MonikaReddy-MSFT @mrbullwinkle thanks for the help so far, I still need the confirmation though
(if the metrics might not be kept, then I need a different storage for them)
@ishepherd I'm re-pinging folks directly over e-mail. We all get a lot of GitHub notifications so @mentions sometimes disappear into the void. Thanks for your patience.
Metric data storage in the Application Insights log store can be saved for up to 730 days. Metric data in the Azure Monitor metrics store is only stored for 90 days,
Thanks @DaleKoetke
So if I've sent it with App Insights SDK, and it's in customMetrics, this means it's Application Insights log store?