我正在免费层上使用Azure Application Insights。我们还使用amazon AWS健康检查,点击预定页面,期望得到200个响应,如果得到不同的响应,它就会执行操作。
有没有一种简单的方法来过滤或排除这些请求?
如果我被困在这条路上,这能过滤AWS Route53检查吗?
public void Process(ITelemetry item)
{
if (!string.IsNullOrEmpty(item.Context.Operation.SyntheticSource)) {return;}
this.Next.Process(item);
}
编辑更新
<ExcludeComponentCorrelationHttpHeadersOnDomains>
<!--
Requests to the following hostnames will not be modified by adding correlation headers.
This is only applicable if Profiler is installed via either StatusMonitor or Azure Extension.
Add entries here to exclude additional hostnames.
NOTE: this configuration will be lost upon NuGet upgrade.
-->
<Add>core.windows.net</Add>
<Add>core.chinacloudapi.cn</Add>
<Add>core.cloudapi.de</Add>
<Add>core.usgovcloudapi.net</Add>
<Add>localhost</Add>
<Add>127.0.0.1</Add>
</ExcludeComponentCorrelationHttpHeadersOnDomains>
有没有其他的资源或教程,我唯一能找到的:
https://docs.microsoft.com/en-us/azure/application-insights/app-insights-api-filtering-sampling#filtering