def send_metrics_now
      ms = registry_measurements

      if ms.empty?
        Spectator.logger.debug 'No measurements to send'
      else
        uri = @registry.config[:uri]
        ms.each_slice(@registry.batch_size) do |batch|
          payload = payload_for_measurements(batch)
          Spectator.logger.info "Sending #{batch.length} measurements to #{uri}"
          @http.post_json(uri, payload)
        end
      end
    end
def send_metrics_now
      ms = registry_measurements

      if ms.empty?
        Spectator.logger.debug 'No measurements to send'
      else
        uri = @registry.config[:uri]
        ms.each_slice(@registry.batch_size) do |batch|
          payload = payload_for_measurements(batch)
          Spectator.logger.info "Sending #{batch.length} measurements to #{uri}"
          @http.post_json(uri, payload)
        end
      end
    end
Send the current measurements to our aggregator service