code: public String buildMessage(String metricName, Object value, long timestamp) {
          String valueToString = "null";
          if( value != null ) {
              valueToString = value.toString();
          }
  
          JsonObject jsonValue = new JsonObject();
          jsonValue.add("host", getHostName());
          jsonValue.add("key", metricName);
          jsonValue.add("value", valueToString);
          jsonValue.add("clock", timestamp);
  
          return jsonValue.toString();
      }
docs: Builds a metric string to send to a Graphite instance.
  
  @return The metric json string without trailing newline