<p>I am following <a href="https://istio.io/latest/docs/tasks/traffic-management/egress/egress-control/#access-an-external-https-service" rel="nofollow noreferrer">this guide</a>.</p>
<p>Ingress requests are getting logged. Egress traffic control is working as expected, except I am unable to log egress HTTP requests. What is missing?</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.istio.io/v1beta1
kind: Sidecar
metadata:
  name: myapp
spec:
  workloadSelector:
    labels:
      app: myapp

  outboundTrafficPolicy:
    mode: REGISTRY_ONLY

  egress:
    - hosts:
        - default/*.example.com
</code></pre>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: example

spec:
  location: MESH_EXTERNAL
  resolution: NONE
  hosts:
    - '*.example.com'

  ports:
    - name: https
      protocol: TLS
      number: 443
</code></pre>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: telemetry.istio.io/v1alpha1
kind: Telemetry
metadata:
  name: mesh-default
  namespace: istio-system
spec:
  accessLogging:
    - providers:
        - name: envoy

</code></pre>
<p>Kubernetes 1.22.2 Istio 1.11.4</p>

<p>For ingress traffic logging I am using <code>EnvoyFilter</code> to set log format and it is working without any additional configuration. In the egress case, I had to set <code>accessLogFile: /dev/stdout</code>.</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  name: config
  namespace: istio-system
spec:
  profile: default
  meshConfig:
    accessLogFile: /dev/stdout
</code></pre>
