signalfx_test_tracer 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/signalfx_test_tracer.rb +5 -0
- data/lib/signalfx_test_tracer/span.rb +11 -0
- data/opentracing_test_tracer.gemspec +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: 57d420c72d017e8011674ec5b1268f489b91d6a30c7a509d49fef16b8c142944
|
4
|
+
data.tar.gz: '0254917a3780b3d6899bafa8d040af74f09044e4643f918c19300e4f9ba3b4da'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fbe9c27af7b42af9c939028e5f4f65be2aa08710252291342df20013038a2635d94ebe6bdee4e1c3c5d8cdc8b553fecca0da1c1ff83b64123c5299d37b33088
|
7
|
+
data.tar.gz: d4029092232545f2893f3883ffe7df0ead5649a370a98a27b42e9556ecf6b9fb6655107ececf09c0d5318d5feda658876c6782c8ebd51137c96a23b3b93385ab
|
data/lib/signalfx_test_tracer.rb
CHANGED
@@ -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
|