Skip to content

Instantly share code, notes, and snippets.

@xvzf
Created December 19, 2022 16:25
Show Gist options
  • Save xvzf/ad5666ecc3ec0cee3a2b1af6af12acbe to your computer and use it in GitHub Desktop.
Save xvzf/ad5666ecc3ec0cee3a2b1af6af12acbe to your computer and use it in GitHub Desktop.
Istio debug logging for specific headers
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: matthias-tmp-access-logging
namespace: my-service-123
annotations:
owner: matthias
spec:
configPatches:
- applyTo: NETWORK_FILTER
match:
context: SIDECAR_INBOUND
listener:
filterChain:
filter:
name: "envoy.filters.network.http_connection_manager"
patch:
operation: MERGE
value:
typed_config:
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"
access_log:
- name: envoy.access_loggers.file
typed_config:
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog"
path: /dev/stdout
log_format:
json_format:
identifier: badc0ffee
request_path: '%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%'
authorization: "%REQ(my-debug-header)%"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment