ref(core): Use serializeAttributes for metric attribute serialization
#18582
+169
−134
serializeAttributes for metric attribute serialization
#18582