Thanks for posting your question in the Microsoft Q&A forum.
There are a few options to remotely disable or manage Application Insights telemetry, but they have some limitations:
- You could potentially use Azure App Configuration to store a configuration flag that controls whether Application Insights is enabled or disabled. Your application would need to be set up to check this configuration value periodically and toggle telemetry on/off accordingly
- You could potentially change or invalidate the instrumentation key remotely. This would effectively stop data from being sent to Application Insights, though it wouldn't technically "disable" it in the application.
- Azure Monitor provides some capabilities for managing Application Insights resources, but it doesn't appear to offer a direct way to disable telemetry remotely
- If your application exposes an API, you could potentially create an endpoint that toggles Application Insights on/off. However, as you mentioned, this may not be feasible if you don't have direct access to the customer's system
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful