I'd like to know how does istio get these data (Attribute Vocabulary) from envoy(or mixer adapter) and how does envoy export these data in detail.
According to banzaicloud
Because Istio Telemetry V2 lacks a central component (Mixer) with access to K8s metadata, the proxies themselves require the metadata necessary to provide rich metrics. Additionally, features provided by Mixer had to be added to the Envoy proxies to replace the Mixer-based telemetry. Istio Telemetry V2 uses two custom Envoy plugins to achieve just that.
In-proxy service-level metrics in Telemetry V2 are provided by two custom plugins, metadata-exchange and stats.
By default, in Istio 1.5, Telemetry V2 is enabled as compiled in Istio proxy filters, mainly for performance reasons. The same filters are also compiled to WebAssembly (WASM) modules and shipped with Istio proxy.
You can find more useful information in above documentation.
Because I want to develop the WASM plugin for logging and I need to define the custom log data which equals logging at telemetry v1 in istio
I've found this documentation on envoy site, there are all the attributes you might use.
There is an example about how to get these values in Wasm ABI.
Path expressions allow access to inner fields in structured attributes via a sequence of field names, map, and list indexes following an attribute name. For example, get_property({“node”, “id”}) in Wasm ABI extracts the value of id field in node message attribute, while get_property({“request”, “headers”, “my-header”}) refers to the comma-concatenated value of a particular request header.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…