Kubernetes Service Name in access logs

I’m working to upgrade an older Istio installation from Telemetry v1 to Telemetry v2. In Telemetry v1, it was possible to generate customized access logs at the IngressGateway which contain the destination Kubernetes Service name, the source Kubernetes Service name, namespaces, etc.

Our configuration roughly followed this guide: Istioldie 1.6 / Mixer Configuration Model (Deprecated)

We used these attributes: Istioldie 1.6 / Attribute Vocabulary (Deprecated)

How can I get at this information in Telemetry v2, and send it to the access logs?


You can use the aaccessLogFormat field in the meshConfig - check the docs here: Istio / Getting Envoy's Access Logs


Hi Peter, thanks for your help. I understand how to get Istio / Envoy access logs enabled, and how to customize the format using the Command Operators listed here: Access logging — envoy 1.19.0-dev-c7cfbf documentation

I cannot find any Command Operator which will give me Kubernetes Service Name or Kubernetes Label, etc. How can I get this sort of data out of Kubernetes into the Istio access logs?

I looked a bit into this and it doesn’t look like there’s an easy way to bring these in (or perhaps I am missing something very obvious :).

The one command operator you could use is the DYNAMIC_METADATA one. However, in order to use that you’d need one of the filters to store the data you’re looking for (labels, service names); it seems like there aren’t any filters storing these values at the moment. So even if you’d write your own filter, you’d have to figure out where the filter gets that data, then store it in the metadata, just so you can retrieve it in the access logs.