Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
249 views
in Technique[技术] by (71.8m points)

envoyproxy - How to get the data for attribute vocabulary in istio

In https://istio.io/v1.7/docs/reference/config/policy-and-telemetry/mixer-overview/#attributes,

given Istio deployment has a fixed vocabulary of attributes that it understands. The specific vocabulary is determined by the set of attribute producers being used in the deployment. The primary attribute producer in Istio is Envoy, although specialized Mixer adapters can also generate attributes.

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.

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 isio...

question from:https://stackoverflow.com/questions/65903750/how-to-get-the-data-for-attribute-vocabulary-in-istio

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...