I am trying to filter out a log_type_filter when it has the status code 200. I need to know how to exclude this exact match and not all of the log_type_filter. Here is what I have
filter:
and_filter:
filters:
- log_type_filter:
op: EQ
value:
default_value: envoy_access_log
exclude: true
- or_filter:
filters:
- status_code_filter:
comparison:
op: GE
value:
default_value: 201
- status_code_filter:
comparison:
op: LE
value:
default_value: 199
Edit I misread the documentation where it states
Performs a logical “and” operation on the result of each filter in filters. Filters are evaluated sequentially and if one of them returns false, the filter returns false immediately.
So i believe I should just need to do
filter:
and_filter:
filters:
- log_type_filter:
comparison:
op: EQ
value: envoy_access_log
- status_code_filter:
comparison:
op: EQ
value: 200
Please let me know if you see something invalid. I do not have the opportunity to test this at this time.