istio 以某种方式覆盖了 envoy

问题描述

正如在 this 详细回答中很好地解释的那样,您可以在 istio自定义 IstioOperator 的日志记录格式。

就我而言,IstioOperator(在访问日志记录配置方面)看起来像这样

    meshConfig:
      accessLogEncoding: JSON
      accessLogFile: /dev/stdout

即未指定 accessLogFormat

但是,在 StackDriver 中,当看到我的 istio-proxy 日志时,我看到了format 中定义的一些字段NOT,例如这是相应的 istio-proxy 日志条目

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: "-"

我可以看到例如 istio_policy_statusdownstream_local_address(也许还有更多),它们不是认格式的一部分。

istio 在哪里覆盖 envoy认访问记录格式?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)