We have Sitecore 9.0.2 based UAT and Live website in Azure PaaS environment. Before some time we have configured Sitecore analytics tracking in UAT and Live both. Now what happened is in both environment, there are millions of Anonymous contacts and interactions related records are there in XDB databases.(Shard0 & Shard1 tables).
After doing further check, found that new Anonymous contact record is added in every few seconds and for these records, related Interactions table records 'USerAgent' value shows 'Azure Traffic Manager Endpoint Monitor', so looks like these records have been added/adding due to 'Azure Traffic Manager Endpoint Monitoring' system.
We now need to clean up xDB databases records along with reporting database and also need to stop the tracking of contacts from 'Azure Traffic Manager Endpoint Monitor'.
We are currently trying to fix this first in UAT environment. To stop the tracking of contacts from 'Azure Traffic Manager Endpoint Monitor', following settings have been applied in UAT but no joy.
1)Device detection is enabled in UAT environment and device detection db(s) are also present 2)'Sitecore.Analytics.Tracking.config' file has "Analytics.AutoDetectBots" and "Analytics.Robots.IgnoreRobots" settings as true 3)In 'Sitecore.Analytics.ExcludeRobots.config' file 'Azure Traffic Manager Endpoint Monitor',useragent string has been added to list.
Still new records have been added in every few seconds and not sure what is still missing to exclude tracking of anonymous records from useragent 'Azure Traffic Manager Endpoint Monitor'. Also due to this,can not clean up database tables as well.