class Trace::ZipkinSqsSender

Constants

IP_FORMAT

Public Class Methods

new(options) click to toggle source
Calls superclass method Trace::ZipkinSenderBase::new
# File lib/zipkin-tracer/zipkin_sqs_sender.rb, line 29
def initialize(options)
  @sqs_options = options[:region] ? { region: options[:region] } : {}
  @queue_name = options[:queue_name]
  @async = options[:async] != false
  SuckerPunch.logger = options[:logger]
  super(options)
end

Public Instance Methods

flush!() click to toggle source
# File lib/zipkin-tracer/zipkin_sqs_sender.rb, line 37
def flush!
  if @async
    SqsClient.perform_async(@sqs_options, @queue_name, spans.dup)
  else
    SqsClient.new.perform(@sqs_options, @queue_name, spans)
  end
end