Stop Application Insights

て烟熏妆下的殇ゞ 提交于 2021-01-20 08:52:39

问题


We installed Application Insights for our Web Application hosted in Azure portal.

Now it sends reports, etc, the application is just started, we don't need all that data. Is there a way to completely stop/disable all data collection/reports by the Application Insights?

My application is ASP.NET Core one, I have a ConnectedService.json file under "Application Insights" folder, with the following content

{
  "ProviderId": "Microsoft.ApplicationInsights.ConnectedService.ConnectedServiceProvider",
  "Version": "8.6.404.2",
  "GettingStartedDocument": {
    "Uri": "https://go.microsoft.com/fwlink/?LinkID=798432"
  }
}

回答1:


As Far as I know, currently it seems that stop collection report is not supported unless we remove the relationship between WebApp and application insight or remove the application insight. If you stick on stopping the application insight you could give your feedback to Azure team.

The following ways are that remove the relationship between WebApp and application insight or remove the application insight.

If we don't want to use Application Insights to collection the report for the App, we could remove the instrumentation key from the .config file as Peter Bons said.

If we add the application insight as extension we could remove it from the Azure kudu(https://youwebsite.scm.azurewebsites.net). It seems that you are not in this case.

Update:

For Asp.net core project we could remove the InstrumentationKey from the appsettings.json file.




回答2:


You could put a daily cap on your collected data.

It's under Configure -> Features & pricing. You can go as low as 0.0323 GB a day. Which amounts to about 40 cents a month.

This way you don't have to publish your app to stop or start collecting data.

But this way you have to be able to accept a console error.




回答3:


If you want to limit the % of data being received in azure server go to the app->usage and estimated costs and click on Data sampling.

Or to limit the data from the application itself configure the ApplicationInsigths.config file buy adding :

 <MinSamplingPercentage>0.1</MinSamplingPercentage>

<MaxSamplingPercentage>100.0</MaxSamplingPercentage>

https://docs.microsoft.com/en-gb/azure/azure-monitor/app/sampling#configuring-adaptive-sampling-for-aspnet-applications



来源:https://stackoverflow.com/questions/46365347/stop-application-insights

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!