k8wiz
Istio
Medium
Troubleshooting

An Istio Telemetry resource filters access logs with response.code >= 500, and failed connections never appear in the logs. Which filter expression also keeps them?

Select your answer:

Show answer and explanation

Answer: !has(response.code) || response.code >= 500

Explanation

When a connection fails, there is no response.code attribute at all, so a filter that only compares the code drops those entries. The Istio docs recommend !has(response.code) || response.code >= 500 to keep both server errors and failed connections. Testing for code 0 does not help because the attribute is missing, not zero.

Read more about Istio