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 +4 -4
- data/lib/startback/audit/tracer.rb +9 -4
- data/lib/startback/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ed405285cb6d2493a1bb27a544b29c3d2fbe2726cbcdf6a1a1125befe124579
|
4
|
+
data.tar.gz: d43bed406d0305cf5a5e8215313d65396fa50096db5c2c7ac4151d9cedcf4d27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
|
data/lib/startback/version.rb
CHANGED