lib/zipkin/json_client.rb in zipkin-0.4.1 vs lib/zipkin/json_client.rb in zipkin-0.4.2
- old
+ new
@@ -28,9 +28,10 @@
def emit_batch(spans)
return if spans.empty?
http = Net::HTTP.new(@spans_uri.host, @spans_uri.port)
+ http.use_ssl = @spans_uri.scheme == 'https'
request = Net::HTTP::Post.new(@spans_uri.request_uri, {
'Content-Type' => 'application/json'
})
request.body = JSON.dump(spans)
response = http.request(request)