def hash_to_wf(dist)
      logger.log("writer subclass #{writer}", :debug)
      raise unless dist.key?(:interval)

      format('!%s %i %s %s source=%s %s %s',
             dist[:interval].to_s.upcase,
             parse_time(dist.fetch(:ts, Time.now)),
             array2dist(dist[:value]),
             dist[:path] || raise,
             dist.fetch(:source, HOSTNAME),
             dist[:tags]&.to_wf_tag,
             opts[:tags]&.to_wf_tag).squeeze(' ').strip
    rescue StandardError
      raise Wavefront::Exception::InvalidDistribution
    end
def hash_to_wf(dist)
      logger.log("writer subclass #{writer}", :debug)
      raise unless dist.key?(:interval)

      format('!%s %i %s %s source=%s %s %s',
             dist[:interval].to_s.upcase,
             parse_time(dist.fetch(:ts, Time.now)),
             array2dist(dist[:value]),
             dist[:path] || raise,
             dist.fetch(:source, HOSTNAME),
             dist[:tags]&.to_wf_tag,
             opts[:tags]&.to_wf_tag).squeeze(' ').strip
    rescue StandardError
      raise Wavefront::Exception::InvalidDistribution
    end
Convert a validated point to a string conforming to
 https://docs.wavefront.com/proxies_histograms.html. No
 validation is done here.

 @param point [Hash] a hash describing a distribution. See
   #write() for the format.

 rubocop:disable Metrics/AbcSize