signalfx-rails-instrumentation 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +3 -3
- data/README.md +2 -2
- data/lib/rails/instrumentation/utils.rb +9 -2
- data/lib/rails/instrumentation/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df7cf875738579d6b01612b1974b3143b18800e644b0cc9c19d29c8d84561b19
|
4
|
+
data.tar.gz: 3f51dc73cc822fc5861292c9081fe1cbd4af0617e7ace79d2fa2ff10ee4caac3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2126136ff16f9144b5e7de4a37694723da323a91b0e72f5e250d2a824706a543d464956ee74e8fad28b25f1be090109fc5098d83ba6e6dbc67e82c0cbfa7a57
|
7
|
+
data.tar.gz: a2729daf28ea2b98e96e04008b8132687703dbb33a3250fe9c9cf86b30112c4c3330173a9eeac8a45edda1fcb38969cd419a7b97579a1d275826c93124403da0
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
signalfx-rails-instrumentation (0.2.
|
4
|
+
signalfx-rails-instrumentation (0.2.1)
|
5
5
|
opentracing (~> 0.3)
|
6
6
|
|
7
7
|
GEM
|
@@ -156,7 +156,7 @@ GEM
|
|
156
156
|
websocket-extensions (0.1.5)
|
157
157
|
|
158
158
|
PLATFORMS
|
159
|
-
|
159
|
+
x86_64-darwin-19
|
160
160
|
|
161
161
|
DEPENDENCIES
|
162
162
|
appraisal (~> 2.2)
|
@@ -170,4 +170,4 @@ DEPENDENCIES
|
|
170
170
|
signalfx_test_tracer (>= 0.1.2)
|
171
171
|
|
172
172
|
BUNDLED WITH
|
173
|
-
2.
|
173
|
+
2.2.5
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ currently instrumented by ActiveSupport are available to trace.
|
|
12
12
|
Add this line to your application's Gemfile:
|
13
13
|
|
14
14
|
```ruby
|
15
|
-
gem 'rails-instrumentation'
|
15
|
+
gem 'signalfx-rails-instrumentation'
|
16
16
|
```
|
17
17
|
|
18
18
|
And then execute:
|
@@ -21,7 +21,7 @@ And then execute:
|
|
21
21
|
|
22
22
|
Or install it yourself as:
|
23
23
|
|
24
|
-
$ gem install rails-instrumentation
|
24
|
+
$ gem install signalfx-rails-instrumentation
|
25
25
|
|
26
26
|
## Usage
|
27
27
|
|
@@ -26,7 +26,7 @@ module Rails
|
|
26
26
|
|
27
27
|
# tag transaction_id
|
28
28
|
span.set_tag('transaction.id', event.transaction_id)
|
29
|
-
tag_error(span, event.payload) if event.payload.key? :
|
29
|
+
tag_error(span, event.payload) if event.payload.key? :exception
|
30
30
|
|
31
31
|
span.finish(end_time: event.end)
|
32
32
|
end
|
@@ -36,7 +36,14 @@ module Rails
|
|
36
36
|
# keys. These will be tagged and logged according to the OpenTracing
|
37
37
|
# specification.
|
38
38
|
def tag_error(span, payload)
|
39
|
-
|
39
|
+
if payload.key? :exception_object
|
40
|
+
span.record_exception(payload[:exception_object])
|
41
|
+
else
|
42
|
+
exception = payload[:exception]
|
43
|
+
span.set_tag(:error, true)
|
44
|
+
span.set_tag(:'sfx.error.kind', exception[0])
|
45
|
+
span.set_tag(:'sfx.error.message', exception[1])
|
46
|
+
end
|
40
47
|
end
|
41
48
|
end
|
42
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: signalfx-rails-instrumentation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ashwin Chandrasekar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentracing
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
- !ruby/object:Gem::Version
|
186
186
|
version: '0'
|
187
187
|
requirements: []
|
188
|
-
rubygems_version: 3.1.
|
188
|
+
rubygems_version: 3.1.4
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: OpenTracing instrumentation for Rails.
|