signalfx_test_tracer 0.1.0 → 0.1.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: 1c7975556c65bcae13576a0042f49d1f8e626f57c739a14e6a4e3cd8296cf5c5
4
- data.tar.gz: 4b45314f7606a4bcdd88d790f7cd0405f79fb27a8fc250aa739439d957ab8588
3
+ metadata.gz: 57d420c72d017e8011674ec5b1268f489b91d6a30c7a509d49fef16b8c142944
4
+ data.tar.gz: '0254917a3780b3d6899bafa8d040af74f09044e4643f918c19300e4f9ba3b4da'
5
5
  SHA512:
6
- metadata.gz: 174023e555261b6ace6c7685bad9ab7f9d3fd5033cef1ace14dfe662b56224fb7fd4f82ea61c7bfadc475543bd2d76990e8c303424e23a97d153b3843a5a162a
7
- data.tar.gz: 867fe20b48d8b766b5f292fc525f82b2f1b43c2cf928331da0f8306d349d9409fb75d84edd0d0c195b54fb1cf2d2ee8312d7a32547efc78beb7b682f270cf61a
6
+ metadata.gz: 1fbe9c27af7b42af9c939028e5f4f65be2aa08710252291342df20013038a2635d94ebe6bdee4e1c3c5d8cdc8b553fecca0da1c1ff83b64123c5299d37b33088
7
+ data.tar.gz: d4029092232545f2893f3883ffe7df0ead5649a370a98a27b42e9556ecf6b9fb6655107ececf09c0d5318d5feda658876c6782c8ebd51137c96a23b3b93385ab
@@ -221,4 +221,9 @@ class OpenTracingTestTracer
221
221
  active_scope = @scope_manager.active
222
222
  active_scope&.span&.context
223
223
  end
224
+
225
+ def record_exception(exception, record_error=true)
226
+ span = @scope_manager.active
227
+ span.record_exception(exception, record_error) if span
228
+ end
224
229
  end
@@ -66,6 +66,17 @@ class OpenTracingTestTracer
66
66
  nil
67
67
  end
68
68
 
69
+ # Record an exception on this span
70
+ def record_exception(exception, record_error)
71
+ set_tag(:error, true) if record_error
72
+ set_tag(:'sfx.error.kind', exception.class.to_s)
73
+ set_tag(:'sfx.error.object', exception)
74
+ set_tag(:'sfx.error.message', exception.message)
75
+ if not exception.backtrace.nil?
76
+ set_tag(:'sfx.error.stack', exception.backtrace.join('\n'))
77
+ end
78
+ end
79
+
69
80
  # Finish the {Span}
70
81
  #
71
82
  # @param end_time [Time] custom end time, if not now
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'signalfx_test_tracer'
8
- spec.version = '0.1.0'
8
+ spec.version = '0.1.1'
9
9
  spec.authors = ['SignalFx Engineers']
10
10
  spec.email = ['eng@signalfx.com']
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signalfx_test_tracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SignalFx Engineers