zipkin-tracer 0.36.0 → 0.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b65eb925752852ca858a99985cd7d9c93927b75a2094e9accddbc50adecf759
4
- data.tar.gz: a0f10e2b2798cb7d7c235ee9c6b5165da922e66f01a57c503b8583bbd34965ac
3
+ metadata.gz: 9731d7b33a04a21d40dbb5e887bc9f54d3052822b9a940b4c67abd9d263802ee
4
+ data.tar.gz: 914938b89e93da3977a7df4eea19d5ec5e4c626410776c2fb69c25ec853a9c0c
5
5
  SHA512:
6
- metadata.gz: fb7d829f81ae485aabf96c50f970d0637dd836be7379496d6d6879a7928054dbc0922c77b37702a274734a1b1007a78cb17767fab344b7fc65c382a5af338edc
7
- data.tar.gz: 22d4fbc7486aa150fb63a87efa258f38c9a290d1f47ff0ada1949d75f37c90f9294fe69e55cfeb5a29c35522691d8a9051417969f6443b2c2cbcc541992ba603
6
+ metadata.gz: de1f610c691567ed0f31bfe1d71625082c0b8a73b2fd78294770b566d24d39b49af45fab24b440947a3ae9f869ae6d25f97165c790f3a7170b414d4c94f5d820
7
+ data.tar.gz: 74f20c4a09682e3049194e3d1d897f2977d6a00b08f2ffc98707c8d9e1dff76918892ea9726a0fe938670aa642ea01b7f03073ac9fe2efa0b78148ddbcc4c1ba
@@ -1,3 +1,3 @@
1
1
  module ZipkinTracer
2
- VERSION = '0.36.0'.freeze
2
+ VERSION = '0.36.1'.freeze
3
3
  end
@@ -3,28 +3,29 @@ require 'sucker_punch'
3
3
  require 'zipkin-tracer/zipkin_sender_base'
4
4
  require 'zipkin-tracer/hostname_resolver'
5
5
 
6
- class AsyncHttpApiClient
7
- include SuckerPunch::Job
8
- SPANS_PATH = '/api/v2/spans'
6
+ module Trace
7
+ class AsyncHttpApiClient
8
+ include SuckerPunch::Job
9
+ SPANS_PATH = '/api/v2/spans'
10
+
11
+ def perform(json_api_host, spans)
12
+ spans_with_ips =
13
+ ::ZipkinTracer::HostnameResolver.new.spans_with_ips(spans, ZipkinHttpSender::IP_FORMAT).map(&:to_h)
9
14
 
10
- def perform(json_api_host, spans)
11
- spans_with_ips =
12
- ::ZipkinTracer::HostnameResolver.new.spans_with_ips(spans, ZipkinHttpSender::IP_FORMAT).map(&:to_h)
13
- resp = Faraday.new(json_api_host).post do |req|
14
- req.url SPANS_PATH
15
- req.headers['Content-Type'] = 'application/json'
16
- req.body = JSON.generate(spans_with_ips)
15
+ resp = Faraday.new(json_api_host).post do |req|
16
+ req.url SPANS_PATH
17
+ req.headers['Content-Type'] = 'application/json'
18
+ req.body = JSON.generate(spans_with_ips)
19
+ end
20
+ rescue Net::ReadTimeout, Faraday::ConnectionFailed => e
21
+ error_message = "Error while connecting to #{json_api_host}: #{e.class.inspect} with message '#{e.message}'. " \
22
+ "Please make sure the URL / port are properly specified for the Zipkin server."
23
+ SuckerPunch.logger.error(error_message)
24
+ rescue => e
25
+ SuckerPunch.logger.error(e)
17
26
  end
18
- rescue Net::ReadTimeout, Faraday::ConnectionFailed => e
19
- error_message = "Error while connecting to #{json_api_host}: #{e.class.inspect} with message '#{e.message}'. " \
20
- "Please make sure the URL / port are properly specified for the Zipkin server."
21
- SuckerPunch.logger.error(error_message)
22
- rescue => e
23
- SuckerPunch.logger.error(e)
24
27
  end
25
- end
26
28
 
27
- module Trace
28
29
  # This class sends information to the Zipkin API.
29
30
  # The API accepts a JSON representation of a list of spans
30
31
  class ZipkinHttpSender < ZipkinSenderBase
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zipkin-tracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.36.0
4
+ version: 0.36.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franklin Hu
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2019-04-12 00:00:00.000000000 Z
16
+ date: 2019-04-15 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: faraday