writeComplexMetricString automatically create runtime tag whereas _value.complex doesn't

with awk, writeComplexMetricString automatically create im.metric-type=runtime tag,

with json, the corresponding line does not, example, the following line does not automatically generate im.metric-type=runtime tag

_value.complex

value:
_text: "tree_designated_root"


I thought functionality wise these two should be equivalent, no?

You are right. Functionality wise they should be equivalent. All parsers (XML, JSON and AWK) should behave the same. I'll cycle it internally with our product to decide if we want to have all parsers add metric-type=runtime tag when writing complex metric