startback 0.18.1 → 0.18.2

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: b78dea8794d36995b6941280807a9766deae9604d00ef51f96f88a9f06206142
4
- data.tar.gz: 95457f1df4d0a3d6341414a17cfb3da56c7c3ad89466322b78e0fd2d9ab049a8
3
+ metadata.gz: 1ed405285cb6d2493a1bb27a544b29c3d2fbe2726cbcdf6a1a1125befe124579
4
+ data.tar.gz: d43bed406d0305cf5a5e8215313d65396fa50096db5c2c7ac4151d9cedcf4d27
5
5
  SHA512:
6
- metadata.gz: 3c08dc7d170c6a3baf9889a050ae0f239dee3d9cd0d8d3f8952b778026f8f1fd1a72979143bc553cf2b8bc16df816a14618bab067f924d4eb0f28774484685a5
7
- data.tar.gz: 66547cfef8f9d27f0b9e45d4781fc0db225d753d610bbb95c7e1856bf006fedc48bec30753da0ac10607f4af0219f340db01da2b151f79c3257add9723c23a61
6
+ metadata.gz: 5b570bd27e06e64b5d3c5aee29a30d05ae021ecf3828b051b20918d5536c44a046be6f5646c552fe92e0ea9c9b20628fffee5becb398547b94351796e36d16e4
7
+ data.tar.gz: 5892c7a23cb3bdc84128f3b15965d987464338a091338410699ca69b1ffff8021a03f6ce171d66b5e6f054e2b3e5a134820f24d242e2ac50d16b62f060cc8cd7
@@ -41,16 +41,20 @@ module Startback
41
41
  end
42
42
 
43
43
  def fork(attributes = {}, &block)
44
- span = last_span!.fork(@redactor.redact(attributes))
44
+ attributes = @redactor.redact(attributes)
45
+ span = last_span!.fork(attributes)
45
46
  @stack << span
46
47
  propagate_to_listeners(span)
47
48
  result, error = nil, nil
48
49
  timing = Benchmark.measure do
49
50
  result, error = exec_block_with_error_handling(block)
50
51
  end
51
- span = @stack.pop.finish(timing, error)
52
- propagate_to_listeners(span)
53
52
  error ? raise(error) : result
53
+ ensure
54
+ unless stack.empty?
55
+ span = @stack.pop.finish(timing, error)
56
+ propagate_to_listeners(span)
57
+ end
54
58
  end
55
59
 
56
60
  def on_span(listener = nil, &block)
@@ -75,8 +79,9 @@ module Startback
75
79
  end
76
80
 
77
81
  def propagate_to_listeners(span)
82
+ puts "Propagating #{span.inspect}"
78
83
  @listeners.each do |listener|
79
- listener.call(span)
84
+ listener.call(span) rescue nil
80
85
  end
81
86
  end
82
87
 
@@ -2,7 +2,7 @@ module Startback
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 18
5
- TINY = 1
5
+ TINY = 2
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: startback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau