代码之家  ›  专栏  ›  技术社区  ›  DDulla

应用见解:过滤网站健康检查?

  •  1
  • DDulla  · 技术社区  · 7 年前

    我正在免费层上使用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

    1 回复  |  直到 7 年前
        1
  •  2
  •   John Gardner    7 年前

    您必须像上面那样编写遥测初始值设定项。

    否则,您可能会丢弃webtests中可能出现的传入请求/依赖项/异常,这些请求/依赖项/异常也会显示为合成。