if (source != null && !source.isEmpty()) {
g.writeStringField("source", source);
}
g.writeNumberField("measure_time", gauge.getEpoch(TimeUnit.SECONDS));
if (gauge.getValue() instanceof Integer) {
g.writeNumberField("value", (Integer) gauge.getValue());
} else if (gauge.getValue() instanceof Long) {
g.writeNumberField("value", (Long) gauge.getValue());
} else if (gauge.getValue() instanceof Float) {
g.writeNumberField("value", (Float) gauge.getValue());
} else if (gauge.getValue() instanceof Double) {