Envoy Statistics

The Envoy proxy keeps detailed statistics about network traffic.

Envoy’s statistics only cover the traffic for a particular Envoy instance. SeeObservability for persistent per-service Istio telemetry. Thestatistics the Envoy proxies record can provide more information about specific pod instances.

To see the statistics for a pod:

  1. $ kubectl exec $POD -c istio-proxy -- pilot-agent request GET stats

See the Envoy documentationfor an explanation of the data recorded.

By default, Istio configures Envoy to record minimal statistics. The default collectionkeys are:

  • cluster_manager
  • listener_manager
  • http_mixer_filter
  • tcp_mixer_filter
  • server
  • cluster.xds-grpc

To see the Envoy settings for statistics data collection useistioctl proxy-config bootstrap and follow thedeep dive into Envoy configuration.Envoy only collects statistical data on items matching the inclusion_list withinthe stats_matcher JSON element.

To Configure Envoy to record statistics for inbound or outbound traffic, add thesidecar.istio.io/statsInclusionPrefixes annotation to the pod template in the Kubernetes Deployment.Add the cluster.outbound prefix to gather data about outbound traffic activity and circuit breaking.To gather data on inbound traffic, add the listener prefix. The samplefortio-deploy.yamlshows use of sidecar.istio.io/statsInclusionPrefixes with the cluster.outbound prefix.

You can override the Envoy defaults to gather less data than usual. Usesidecar.istio.io/statsInclusionPrefixes: cluster_manager,listener_managerto collect the least statistics possible.