envoyproxy/envoy

Access log status code filter not working for response code 0

Open

#17,482 建立於 2021年7月26日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)C++ (5,373 fork)batch import
area/access_logbughelp wanted

倉庫指標

Star
 (27,997 star)
PR 合併指標
 (平均合併 8天) (30 天內合併 378 個 PR)

描述

Description: Unable to use status code filters to log requests with a 0 response code.

Repro steps: We are running Istio 1.6.13 which uses Envoy 1.15.4. We want to only output access logs for HTTP requests with responses >= 400 or == 0.

This is the filter being applied:

filter:
  or_filter:
    filters:
    - status_code_filter:
        comparison:
          op: GE
          value:
            default_value: "400"
            runtime_key: "400"
    - status_code_filter:
        comparison:
          op: EQ
          value:
            default_value: "0"
            runtime_key: "0"

All 4xx/5xx requests are being logged, and 1xx/2xx/3xx requests are not logged, as expected. However, any requests with response code 0 are also not being logged.

Has this been resolved in a newer version of Envoy/Istio?

If not:

  1. Is this the intended behaviour because the status code filter only gets applied to valid HTTP response codes?
  2. Is there a different filter that can be applied to make sure all 0 responses get logged?

貢獻者指南