2

As is very well explained in this elaborate answer, you can customise istio's logging format in IstioOperator.

In my case, IstioOperator (when it comes to access logging configuration) looks like this

    meshConfig:
      accessLogEncoding: JSON
      accessLogFile: /dev/stdout

i.e. no accessLogFormat specified.

However, in StackDriver, when seeing my istio-proxy logs, I see some fields NOT defined in the default format., e.g. here is a corresponding istio-proxy log entry

response_code: "200"
bytes_received: "0"
upstream_cluster: "outbound|80||myscv.default.svc.cluster.local"
downstream_remote_address: "10.17.37.1:57362"
upstream_transport_failure_reason: "-"
user_agent: "Mozilla/5.0 (compatible; Cloudflare-Traffic-Manager/1.0; +https://www.cloudflare.com/traffic-manager/; pool-id: 8474894722kdjfhg49)"
duration: "2"
x_forwarded_for: "10.15.22.1"
route_name: "-"
path: "/health"
requested_server_name: "my.public.url.net"
upstream_host: "10.15.37.29:20000"
downstream_local_address: "10.17.37.16:8443"
protocol: "HTTP/1.1"
request_id: "32455-452d-9a7a-9310-71e098fb490R"
start_time: "2021-01-20T17:27:13.021Z"
authority: "my.public.url.net"
istio_policy_status: "-"
upstream_service_time: "2"
bytes_sent: "2"
upstream_local_address: "10.43.37.16:55496"
method: "GET"
response_flags: "-"

I can see for example istio_policy_status and downstream_local_address (perhaps there are more) which are not part of the default format.

Where does istio override envoy's default access logging format?

pkaramol
  • 16,451
  • 43
  • 149
  • 324
  • What is your istio version? Also you use oos version of istio or gke istio addon? – Jakub Jan 21 '21 at 08:28
  • Not managed (i.e. the open source) `istio` with version `1.7.4`. I have also filed an issue [here](https://github.com/istio/istio/issues/30242) – pkaramol Jan 21 '21 at 09:53
  • I think this [github issue](https://github.com/istio/proxy/pull/3047) might also be helpful in your case. – Jakub Jan 22 '21 at 07:29

0 Answers0