I developed a istio mixer adapter using the walkthrough here. I added more attributes to the dimensions in the instance. But after adding any kind of String map like source.labels or destination.labels I receive nothing. But, string from those map like source.labels[“app”] can be received without a problem.
Looking at your example, I’m not sure I understand the use case.
What would the dimension source_labels look like when populated?
Prometheus, for example, only supports string labels. Is your desire to serialize all of the entries in the map into a single string and then have that be a dimension in the metrics? That seems potentially problematic (cardinality explosion, ordering issues, etc.), but that is probably besides the point.
The metric template only supports dimensions of type Value. This includes the following:
Field
Type
Description
stringValue
string (oneof)
Used for values of type STRING
int64Value
int64 (oneof)
Used for values of type INT64
doubleValue
double (oneof)
Used for values of type DOUBLE
boolValue
bool (oneof)
Used for values of type BOOL
ipAddressValue
IPAddress (oneof)
Used for values of type IPAddress
timestampValue
TimeStamp (oneof)
Used for values of type TIMESTAMP
durationValue
Duration (oneof)
Used for values of type DURATION
emailAddressValue
EmailAddress (oneof)
Used for values of type EmailAddress
dnsNameValue
DNSName (oneof)
Used for values of type DNSName
uriValue
Uri (oneof)
Used for values of type Uri
Notice that string map is not supported.
If you want a particular serialization of a string_map, you could consider extending Mixer to support a marshal() or toString() function that would convert a string map to a string and then use that.
* instance='i1logentry.instance.istio-system'.params: config does not conform to schema of template 'logentry': unable to build message field: variables, unable to build message field: value, unsupported type: STRING_MAP (.istio.policy.v1beta1.Value)
I’ve tried both with clean demo installation of Istio 1.3.4 and 1.4.2 with the same result.
If the instance is changed to map a specific header instead of the header map, no error is shown.
any ideas?
I’ve found out that only Istio API was updated to support STRING_MAP for Out of Process adapters but not the implementation. Are there any plans to include the implementation changes?