zipkin-tracer 0.43.0 → 0.43.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70dbbd7dfea628ace63ca5a3b71e613bd8eacfc87cb85b6e5f22886d89ed5fbf
4
- data.tar.gz: 2f6ba947c19e4b91b444aa83017cb30f974d3feec5658f83a5bba26ada0b7e8f
3
+ metadata.gz: 2493a14e47c3a0a3b5f1873e37a0d3fdfcc6c8cba395fbb8c894edacec1449c4
4
+ data.tar.gz: 7f27e5b54765e4374be3cd18181bcb52b7629ac12c2b9c00f56b9a03d67bea5b
5
5
  SHA512:
6
- metadata.gz: a1833916f188f9750222d1caf930be26ff3a4958f74fb6ee1fcb37229e38981ed2624ed44d7925eec0d3bb54eefb0dee3668e00b760e4f20910ca7db8f13404b
7
- data.tar.gz: 7c9e303402a4954ea1391dcb8b07864173b0f33822c3d359a2ccb53ca58e2f444086c31d73e86ab2b3d87ca54068015501b30d3287436ccfe67f97a3c4c35606
6
+ metadata.gz: f067698e91c87ee24909f7c4f3f47ffa3c081b06e8d6bade1788231835694c4f91d07e3373658427672b20d2e9a7403395bb989a1192b371c3ad1d4e59907c26
7
+ data.tar.gz: b0f099816909682ec8c6fec3a72426f5beb38ace33a5553b8214eb8778604cd33d9f641db3715548660671f0107c868f2c1f15cc1558fc12b1707f3cdf68fdc5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 0.43.1
2
+ * Fix to not flush `PRODUCER` span when a server span is in the stack.
3
+
1
4
  # 0.43.0
2
5
  * Add the `PRODUCER` and `CONSUMER` span kinds.
3
6
 
@@ -1,3 +1,3 @@
1
1
  module ZipkinTracer
2
- VERSION = '0.43.0'.freeze
2
+ VERSION = '0.43.1'.freeze
3
3
  end
@@ -25,7 +25,7 @@ module Trace
25
25
  # If in a thread not handling incoming http requests, it will not have Kind::SERVER, so the span
26
26
  # will never be flushed and will cause memory leak.
27
27
  # If no parent span, then current span needs to flush when it ends.
28
- return if span.has_parent_span? && span.kind == Trace::Span::Kind::CLIENT
28
+ return if skip_flush?(span)
29
29
 
30
30
  flush!
31
31
  reset
@@ -38,6 +38,11 @@ module Trace
38
38
  span
39
39
  end
40
40
 
41
+ def skip_flush?(span)
42
+ return true if span.kind == Trace::Span::Kind::CLIENT && span.has_parent_span?
43
+ return true if span.kind == Trace::Span::Kind::PRODUCER && spans.any? { |s| s.kind == Trace::Span::Kind::SERVER }
44
+ end
45
+
41
46
  def flush!
42
47
  raise "not implemented"
43
48
  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.43.0
4
+ version: 0.43.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franklin Hu
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2020-02-03 00:00:00.000000000 Z
17
+ date: 2020-03-25 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: faraday