IIRC a gauge just emits one value, so that's probably why Jackson is doing that.
h
hdarritchon
11/21/2018, 4:17 PM
if I look in Intellij in debug mode, I see that jvm.files, for exemple, has severals object in it. Even if they are composed and exposed in a single value, it is of type FileDescriptionRatioGauge, and it is composed of jvm and loadavg. And these attributes are not serialized by Jackson nor Gson.
hdarritchon
11/21/2018, 4:17 PM
Capture d’écran 2018-11-21 à 11.59.39.png
m
mp
11/21/2018, 4:19 PM
OK, but Jackson etc aren’t necessarily going to serialize every possible thing on every object, otherwise everything would have a
hashCode
, for instance.
mp
11/21/2018, 4:20 PM
If you want to make your own gauge that exposes other things, you can do that