def span(&block)
      span = Appdash::Span.new(self)
      return span unless block

      begin
        block.call(span)
      ensure
        span.flush
      end
    end
def span(&block)
      span = Appdash::Span.new(self)
      return span unless block

      begin
        block.call(span)
      ensure
        span.flush
      end
    end
Initializes a new client
 @param [Hash] opts
 @option opts [String] :host the hostname, defaults to localhost
 @option opts [Integer] :port the port, defaults to 7701
 @option opts [Integer] :max_buffer_size maximum buffer size in bytes, defaults to 0 (= no buffering, flushes on every span)
 Traces a new span with a series of associated events. Accepts an optional block. If no block is given you must flush
 to send data to the collector.

 @example manual flush

   span = client.span
   span.name "Request"
   span.message "A simple message"
   span.flush

 @example with block

   client.span do |span|
     span.name "Request"
     span.message "A simple message"
   end