Summary
We had been experiencing duplicate telemetry in Application Insights and our Log Analytics workspace for an extended period, likely since approximately April 2024. After significant investigation we identified and resolved the root cause, however a secondary issue has now emerged where the diagnostic setting we deleted as part of the fix is being automatically recreated by an unknown process every 1 to 3 hours. We have deleted it 4 times over the last 2 days and it continues to return.
Background and Timeline
For an extended period we observed duplicate telemetry records appearing in both Application Insights and our Log Analytics workspace. Each logical request, exception, event, dependancy, etc... was producing two identical telemetry records with different itemId values but the same operation_Id, id (span id), duration, and cloud_RoleInstance. This indicated the same single span was being exported twice rather than two separate requests being made.
During this period we also renamed our Application Insights resources from the legacy ai- prefix naming convention to the current Microsoft recommended appi- prefix. This rename itself did not cause the duplicates but brought renewed attention to the telemetry configuration.
We investigated and ruled out the following as root causes:
Duplicate SDK registration or instrumentation in application code (no duplicates present)
Legacy APPINSIGHTS_INSTRUMENTATIONKEY or APPLICATIONINSIGHTS_CONNECTION_STRING environment variables on the App Service (now removed).
Auto-instrumentation enabled via the App Service Application Insights portal blade (now removed).
Platform-level injection via DOTNET_STARTUP_HOOKS, CORECLR_ENABLE_PROFILING, CORECLR_PROFILER, or ASPNETCORE_HOSTINGSTARTUPASSEMBLIES environment variables. (now removed).
Kudu site extensions or Application Insights profiler WebJobs (none present)
Network path differences between environments (not applicable)
Duplicate OTel span creation confirmed by comparing span id values across duplicate records (no duplicates)
Root Cause Identified and Resolved (Explained here: https://learn.microsoft.com/en-us/answers/questions/1837830/possible-reasons-for-double-entries-in-app-insight?page=1&orderby=helpful#answers)
We discovered a Microsoft documentation note stating that for workspace-based Application Insights resources, the diagnostic setting destination cannot be the same Log Analytics workspace the Application Insights resource is natively linked to, as this causes duplicate ingestion.
Our Application Insights resource is workspace-based and natively writes all telemetry to our Log Analytics workspace. We also had a diagnostic setting named Events on the same resource configured to export to that same Log Analytics workspace. This diagnostic setting predated our workspace-based migration and was originally configured when the resource was classic App Insights, at which time, Diagnostic Setting method was the only mechanism for getting telemetry into the workspace. When our resource to workspace-based, which we believe occurred around April 2024/2025 based on Microsoft's documented forced migration timeline, the native pipeline began writing directly to the workspace and the existing diagnostic setting began producing a second copy of every event. (At least we believe).
Deleting the Events diagnostic setting immediately resolved the duplicate telemetry. No duplicates have appeared since deletion. But the diagnostic setting keeps coming back. (Note: We named it "Events"... but the setting contains most all log types available).

Current Issue
After deleting the Events diagnostic setting, it is being recreated automatically without any manual intervention. We have deleted it 4 times over the last 2 days and it reappears within 1 to 3 hours each time. We have attempted to identify the source via Azure Activity Log and PowerShell using Get-AzLog and az monitor activity-log list, however these commands return no results for diagnostic setting operations on this resource despite the portal Activity Log export confirming the events exist. The portal export shows only deletions initiated by our own admin account but does not capture the creation events responsible for the recreation, suggesting the creating identity may not be visible in standard activity log exports or may be a platform-level process.
What We Need
We need Microsoft to identify what process or identity is recreating the Events diagnostic setting on our Application Insights resource after deletion and provide guidance on how to permanently prevent it from being recreated. Or need confirmation on whether this is expected platform behavior tied to the workspace-based migration, and if so, what the supported remediation path is.
Perhaps, the Events diagnostic setting is supposed to be self-present? Which is why it comes back?