Class: Trace::ZipkinSqsSender
- Inherits:
-
ZipkinSenderBase
- Object
- ZipkinSenderBase
- Trace::ZipkinSqsSender
- Defined in:
- lib/zipkin-tracer/zipkin_sqs_sender.rb
Constant Summary collapse
- IP_FORMAT =
:string
Instance Method Summary collapse
- #flush! ⇒ Object
-
#initialize(options) ⇒ ZipkinSqsSender
constructor
A new instance of ZipkinSqsSender.
Methods inherited from ZipkinSenderBase
#end_span, #skip_flush?, #start_span, #with_new_span
Constructor Details
permalink #initialize(options) ⇒ ZipkinSqsSender
Returns a new instance of ZipkinSqsSender.
29 30 31 32 33 34 35 |
# File 'lib/zipkin-tracer/zipkin_sqs_sender.rb', line 29 def initialize() @sqs_options = [:region] ? { region: [:region] } : {} @queue_name = [:queue_name] @async = [:async] != false SuckerPunch.logger = [:logger] super() end |
Instance Method Details
permalink #flush! ⇒ Object
[View source]
37 38 39 40 41 42 43 |
# 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 |