class Trace::ZipkinHttpSender

This class sends information to the Zipkin API. The API accepts a JSON representation of a list of spans

Constants

IP_FORMAT

Public Class Methods

new(options) click to toggle source
Calls superclass method
# File lib/zipkin-tracer/zipkin_http_sender.rb, line 34
def initialize(options)
  @json_api_host = options[:json_api_host]
  @async = options[:async] != false
  SuckerPunch.logger = options[:logger]
  super(options)
end

Public Instance Methods

flush!() click to toggle source
# File lib/zipkin-tracer/zipkin_http_sender.rb, line 41
def flush!
  if @async
    HttpApiClient.perform_async(@json_api_host, spans.dup)
  else
    HttpApiClient.new.perform(@json_api_host, spans)
  end
end