anchor.diff:  
   %% Format a opentsdb output. Each entry is one measurement plus key/value attributes.
   %% put <metric> <time> <measurement> <k1>=<v1> <k2>=<v2>\n
  -exometer_report(Metric, DataPoint, _Extra, Value, #st{socket = Sock, hostname = Hostname} = St) ->
  -    Line = [
  -        "put ", name(Metric), " ", timestamp(), " ", value(Value), " ",
  -        "hostname=", Hostname, " ", "type=", metric_elem_to_list(DataPoint), $\n
  -    ],
  +exometer_report(Metric, DataPoint, _Extra, Value, #st{socket = Sock, hostname = Hostname,
  +                join_metric_and_datapoint = JoinMetricAndDatapoint} = St) ->
  +    if
  +        JoinMetricAndDatapoint ->
  +            Line = [
  +                    "put ", name(Metric), "_", metric_elem_to_list(DataPoint),
  +                    " ", timestamp(), " ", value(Value), " ", "hostname=", Hostname, $\n
  +                   ];
  +        true ->
  +
  +            Line = [
  +                    "put ", name(Metric), " ", timestamp(), " ", value(Value), " ",
  +                    "hostname=", Hostname, " ", "type=", metric_elem_to_list(DataPoint), $\n
  +                   ]
  +    end,
  +
       case gen_tcp:send(Sock, Line) of
           ok ->
               {ok, St};
  
positive.code:           reconnect_interval = ?RECONNECT_INTERVAL,
            connect_timeout = ?DEFAULT_CONNECT_TIMEOUT,
            hostname = undefined,
            socket = undefined}).
  
  %% calendar:datetime_to_gregorian_seconds({{1970,1,1},{0,0,0}}).
  -define(UNIX_EPOCH, 62167219200).
  
negative.code:     {Host, Port} = get_opt(host, Opts, {?DEFAULT_HOST, ?DEFAULT_PORT}),
      ReconnectInterval = get_opt(reconnect_interval, Opts, ?RECONNECT_INTERVAL) * 1000,
      ConnectTimeout = get_opt(connect_timeout, Opts, ?DEFAULT_CONNECT_TIMEOUT),
      JoinMetricAndDatapoint = get_opt(join_metric_and_datapoint, Opts, false),
  
      State = #st{
                      reconnect_interval = ReconnectInterval,
                      host = Host,
                      port = Port,
                      connect_timeout = ConnectTimeout,
                      hostname =  check_hostname(get_opt(hostname, Opts, "auto")),
                      join_metric_and_datapoint = JoinMetricAndDatapoint
                  },
      case connect_opentsdb(Host, Port, ConnectTimeout) of
          {ok, Sock} ->
  