diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-08 16:36:45 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-08 16:36:45 -0600 |
| commit | 2c909dcef60f2439e28ef8e550a5b107ca31ece8 (patch) | |
| tree | cbd1dda5cd96ac3e8470ae0c7fae6e6c89fd02d0 | |
| parent | ce0656246857567696aab58799e2f8e12dab8d65 (diff) | |
chore: configure envoy to use json logging
| -rw-r--r-- | envoy.yml | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1,5 +1,5 @@ admin: - access_log_path: /tmp/admin_access.log + access_log_path: /dev/stdout address: socket_address: {address: 0.0.0.0, port_value: 9901} static_resources: @@ -17,6 +17,21 @@ static_resources: - name: envoy.access_loggers.stdout typed_config: "@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog + log_format: + json_format: + timestamp: "%START_TIME%" + client_ip: "%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%" + authority: "%REQ(:AUTHORITY)%" + protocol: "%PROTOCOL%" + method: "%REQ(:METHOD)%" + path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" + request_id: "%REQ(X-REQUEST-ID)%" + response_code: "%RESPONSE_CODE%" + bytes_received: "%BYTES_RECEIVED%" + bytes_sent: "%BYTES_SENT%" + duration: "%DURATION%" + forwarded_for: "%REQ(X-FORWARDED-FOR)%" + user_agent: "%REQ(USER-AGENT)%" route_config: name: local_route virtual_hosts: |
