attributes
AttributesGeneratorParams
Configures an AttributesGenerator aspect.
The following config specifies two adapters (mixerInfo and k8sPodInfo) that will be used to generate attributes for use within in Mixer:
aspects:
- kind: attributes adapter: mixerInfo params: attributeBindings: mixerVersion: version mixerBuildId: buildID mixerBuildStatus: buildStatus
- kind: attributes adapter: k8sPodInfo params: inputExpressions: srcIP: source.ip | “unknown” tgtIP: target.ip | “unknown” attributeBindings: sourceName: srcName targetName: tgtName
The mixerInfo adapter takes no input arguments and produces three output values (version, buildID, and buildStatus). Those three output values are mapped into three attributes (mixerVersion, mixerBuildId, and mixerBuildStatus) via the attributeBindings.
Similarly, the k8sPodInfo adapter takes two inputs (srcIp and tgtIp). Their values are generated from the expressions that reference mixer attributes. The adapter produces two outputs (srcName and tgtName) that are mapped into mixer attributes (sourceName and targetName) by the attributeBindings.
Field | Type | Description |
---|
inputExpressions | repeated map<string, string> | Map of input params name to attribute expressions. At runtime, each expression will be evaluated to determine the input value provided to the aspect. |
attributeBindings | repeated map<string, string> | Map of attribute descriptor names to the names of values produced by an adapter. This map will be used to translate from adapter outputs into mixer attributes. |