envoyproxy/envoy

Access log status code filter not working for response code 0

Open

#17.482 geöffnet am 26. Juli 2021

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (5.373 Forks)batch import
area/access_logbughelp wanted

Repository-Metriken

Stars
 (27.997 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)

Beschreibung

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?

Contributor Guide