zipkin-tracer 0.13.2 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MmY0OTE5MGZkYzk3ZDhjNjUyMzk0MjA4MWNkZDhjMWZjNDQxNDMyMw==
4
+ MTE5MGZkODVmZTg4Y2QzZGE1MDZhZjQyNzIyNDc3N2I5ZjBkMzllMA==
5
5
  data.tar.gz: !binary |-
6
- YTlhNjFhYzc5Nzg0NDVhMDMwMTRiY2MzNDcxMzVjOGM2NDVjNGM2YQ==
6
+ Y2Y1M2M2N2Y1YTVkMDVkZTljYjg3NTExMDgwMDExYjkxYzdiNGNlYQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDZiNDI1OTRhNzYyYmFiZWMwNmYwZWM3MzdlOGVjNDVlMDU3OWVlMzg4MGY1
10
- ZWVmMzQwZDFiMzkwMGY1YzY3Yzg4NzI4YmFlMWEyNjg0OWQyNjU4NTgzODNh
11
- YWNhN2NjZjMzMTMwZjI0NzYzYTYxNjgxMTNmODNmYjhkZDAzNWE=
9
+ N2RhZGUxYWJmZDUyYzUwMTM4ZjU3NzRiMGMyYmUwMTA1ZTc2ZDRiZWIxYTIw
10
+ MTM1MjNiYWZkNzAyY2NkMDc1MWI0NThjOTIzNmZhN2VlMzBmOWU4OTFiYTEx
11
+ MzYwMjdkZjc3YzU1YjJkMzJjZGE0YmVkNGVlMzBkOTliMzY0NzY=
12
12
  data.tar.gz: !binary |-
13
- YmZkMjYxNDRiMTY0N2Y0NDRhOTMxNjZiYWNjMjFhMTY1MGJiMjVhZDdiNDI0
14
- MGNiMjFiNTI1M2Q1YzU1NjhhZTE5YWVlZDBjZTg3MWNiMDc4OGM4YjdlZTVi
15
- Y2NhN2VjYmMzNDE1MTM5OTljOTgxNDAxNGQ0ZTlhNWM1YWFhODc=
13
+ MTgzM2EzNDhhNDg2YjI0MGU5YTY1YzVlMjk3OTdlNTJmMDdlMmRkNWRlNTU2
14
+ MjhiNWQ1Yjk4ZDM4YWM5NTYzOTllZTIzZmMwYTZiNDI1NGFkNjkzZTUyMmJh
15
+ ZmNkYWY2ZDhkYTYwOGE2MDU5NTY0YTllZWRiYmU1MjU0YTZmZWI=
@@ -20,6 +20,7 @@ module ZipkinTracer
20
20
  @filter_plugin = config[:filter_plugin] # skip tracing if returns false
21
21
  @whitelist_plugin = config[:whitelist_plugin] # force sampling if returns true
22
22
  @logger = config[:logger] || Application.logger
23
+ @logger_setup = config[:logger] # Was the logger in fact setup by the client?
23
24
  end
24
25
 
25
26
  def adapter
@@ -29,6 +30,8 @@ module ZipkinTracer
29
30
  :scribe
30
31
  elsif present?(@zookeeper) && RUBY_PLATFORM == 'java'
31
32
  :kafka
33
+ elsif @logger_setup
34
+ :logger
32
35
  else
33
36
  nil
34
37
  end
@@ -14,6 +14,9 @@ module ZipkinTracer
14
14
  when :kafka
15
15
  require 'zipkin-tracer/zipkin_kafka_tracer'
16
16
  Trace::ZipkinKafkaTracer.new(zookeepers: config.zookeeper)
17
+ when :logger
18
+ require 'zipkin-tracer/zipkin_logger_tracer'
19
+ Trace::ZipkinLoggerTracer.new(logger: config.logger)
17
20
  else
18
21
  require 'zipkin-tracer/zipkin_null_tracer'
19
22
  Trace::NullTracer.new
@@ -12,5 +12,5 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
  module ZipkinTracer
15
- VERSION = "0.13.2"
15
+ VERSION = "0.14.0"
16
16
  end
@@ -0,0 +1,15 @@
1
+ require 'zipkin-tracer/zipkin_tracer_base'
2
+
3
+ module Trace
4
+ class ZipkinLoggerTracer < ZipkinTracerBase
5
+
6
+ def initialize(options)
7
+ @logger = options[:logger]
8
+ super(options)
9
+ end
10
+
11
+ def flush!
12
+ @logger.info("ZIPKIN SPANS: #{spans.map(&:to_h)}")
13
+ end
14
+ end
15
+ end
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.13.2
4
+ version: 0.14.0
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: 2016-02-08 00:00:00.000000000 Z
16
+ date: 2016-02-09 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: faraday
@@ -193,6 +193,7 @@ files:
193
193
  - lib/zipkin-tracer/version.rb
194
194
  - lib/zipkin-tracer/zipkin_json_tracer.rb
195
195
  - lib/zipkin-tracer/zipkin_kafka_tracer.rb
196
+ - lib/zipkin-tracer/zipkin_logger_tracer.rb
196
197
  - lib/zipkin-tracer/zipkin_null_tracer.rb
197
198
  - lib/zipkin-tracer/zipkin_scribe_tracer.rb
198
199
  - lib/zipkin-tracer/zipkin_tracer_base.rb