I am suspecting some menu items of my desktop software are not used, and would use Application Insights for that.
Bad idea: Creating event with Key:"menu" and property "copy" or other item is easy to create and plot in Azure portal and but creates too much noise but also duplicates.
Better idea is to build a list of items that are used throughout the session and at the program closing submit everything once as a list of items that are used.
//for each menu use
Telem.IncrementKey(menuItemText);
internal static void IncrementKey(string key)
{
menuDict.TryGetValue(key, out count);
count++;
menuDict.AddOrUpdate(key, count, (k, v) => count);
}
//on closing program
foreach (var entry in menuDict)
{
menuDictToSend.TryAdd(entry.Key, entry.value);
}
Telemetry.TrackEvent("MenuInteractionsUsed", menuDictToSend);
Another way would be to create key "menu" and comma separate all used menu interactions, but how do I plot those in Azure Portal to figure out the usage?
Is there a better way to submit the data that would be possible to analyze? It is not important how many times single user clicked the item, just which have been used.