In this response, the jvm.file has a value (Int) w...
# ktor
h
In this response, the jvm.file has a value (Int) where as in fact, it is an object with other fields
m
IIRC a gauge just emits one value, so that's probably why Jackson is doing that.
h
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.
Capture d’écran 2018-11-21 à 11.59.39.png
m
OK, but Jackson etc aren’t necessarily going to serialize every possible thing on every object, otherwise everything would have a
hashCode
, for instance.
If you want to make your own gauge that exposes other things, you can do that