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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6a3c7bf3661478b2bec5f02483507fe1c2dd562e37de5c0cc9fcac7028dd8b5
4
- data.tar.gz: 0c353106d680c69cacae43369730acffb0177b2516a1dc4670a3caa403d6220d
3
+ metadata.gz: df7cf875738579d6b01612b1974b3143b18800e644b0cc9c19d29c8d84561b19
4
+ data.tar.gz: 3f51dc73cc822fc5861292c9081fe1cbd4af0617e7ace79d2fa2ff10ee4caac3
5
5
  SHA512:
6
- metadata.gz: 6dc3d47ca08e6aa3792096a6c60bb1fe65a08e749a032ea35e392fedbf6398c2243f729985b178a109d8e5d050542920786c14d44f84f69fc9b6e7151a4ed28b
7
- data.tar.gz: 934184c048ec416dbc104a6da25b48d12ad1b6360cd16ec919dd582f0f80627c62b14d1ccb4d7c1618da6eb77ce2399a6597d0a16843f1f4345d2c9b93ec5dcd
6
+ metadata.gz: b2126136ff16f9144b5e7de4a37694723da323a91b0e72f5e250d2a824706a543d464956ee74e8fad28b25f1be090109fc5098d83ba6e6dbc67e82c0cbfa7a57
7
+ data.tar.gz: a2729daf28ea2b98e96e04008b8132687703dbb33a3250fe9c9cf86b30112c4c3330173a9eeac8a45edda1fcb38969cd419a7b97579a1d275826c93124403da0
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ .ruby-version
1
2
  /*.gem
2
3
  /.bundle/
3
4
  /.yardoc
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- signalfx-rails-instrumentation (0.2.0)
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
- ruby
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.1.4
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? :exception_object
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
- span.record_exception(payload[:exception_object])
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
@@ -1,5 +1,5 @@
1
1
  module Rails
2
2
  module Instrumentation
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.2.1'.freeze
4
4
  end
5
5
  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.0
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: 2020-12-04 00:00:00.000000000 Z
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.2
188
+ rubygems_version: 3.1.4
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: OpenTracing instrumentation for Rails.