Class: Trace::ZipkinHttpSender
- Inherits:
-
ZipkinSenderBase
- Object
- ZipkinSenderBase
- Trace::ZipkinHttpSender
- Defined in:
- lib/zipkin-tracer/zipkin_http_sender.rb
Overview
This class sends information to the Zipkin API. The API accepts a JSON representation of a list of spans
Constant Summary collapse
- IP_FORMAT =
:string
Instance Method Summary collapse
- #flush! ⇒ Object
-
#initialize(options) ⇒ ZipkinHttpSender
constructor
A new instance of ZipkinHttpSender.
Methods inherited from ZipkinSenderBase
#end_span, #skip_flush?, #start_span, #with_new_span
Constructor Details
#initialize(options) ⇒ ZipkinHttpSender
Returns a new instance of ZipkinHttpSender.
34 35 36 37 38 39 |
# File 'lib/zipkin-tracer/zipkin_http_sender.rb', line 34 def initialize() @json_api_host = [:json_api_host] @async = [:async] != false SuckerPunch.logger = [:logger] super() end |
Instance Method Details
#flush! ⇒ Object
41 42 43 44 45 46 47 |
# 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 |