rails-instrumentation 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: feef4718ba517fb6bb6292dac47b14e5ad96bbed06f023fab4719171c6139031
4
- data.tar.gz: 74a99808d2ae6b62724df90d3215b9baa11c4f9c5eaa141cc553fe9e88c8a986
3
+ metadata.gz: 7c7a110fc7c8a823c81d77c1895829f9d9f55a162b68f87cc745647e0f0213c4
4
+ data.tar.gz: 902e1fed1464ef3cab7f912488e52076813ad26d0a60ebd9e3f0a24394d6e6cb
5
5
  SHA512:
6
- metadata.gz: 59e8d5716f3127c8cfb15dd1be6238b0e83ebfc5cc496b268a3f1ae2b4d6027af2980d2110ff98bdda3102bed48ce47184ef9be01053924c1a7dfc0a7410ffc4
7
- data.tar.gz: 5cdc5ba10b2804c4ad2dc7ce5136254183491a458d14ddcfb246ae649d515d85bb7b2aa6635f1d3cb0b8831bb8a31e8fc218aaef7414c9538ecfa8bd11a7df98
6
+ metadata.gz: 4618da4d9e430cb32683f55ad7668bb6626f2b4ed60fc58af81b08441e77f8a2ab01275fd1cf07b5e903dafbd3c754a1ff26e471c20f3f1aa3f54b1751bbb402
7
+ data.tar.gz: 6d99576f07843c873d5fd18ece9d194757870429a0477fe8b23e90f8689dd1839a43f774b6b765a3cc009616b13dbeebd85e1ea8e76438335b2971b511a71a2e
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
3
  /_yardoc/
4
+ /vendor/
4
5
  /coverage/
5
6
  /doc/
6
7
  /pkg/
@@ -103,6 +103,12 @@ module Rails
103
103
  'span.kind' => 'server'
104
104
  )
105
105
 
106
+
107
+ status_code = event.payload[:status]
108
+ if status_code.is_a? Integer and status_code >= 500
109
+ tags['error'] = true
110
+ end
111
+
106
112
  # Only append these tags onto the active span created by the patched 'process_action'
107
113
  # Otherwise, create a new span for this notification as usual
108
114
  active_span = ::Rails::Instrumentation.tracer.active_span
@@ -110,6 +116,9 @@ module Rails
110
116
  tags.each do |key, value|
111
117
  ::Rails::Instrumentation.tracer.active_span.set_tag(key, value)
112
118
  end
119
+ if event.payload.key? :exception
120
+ Utils.tag_error(active_span, event.payload)
121
+ end
113
122
  else
114
123
  Utils.trace_notification(event: event, tags: tags)
115
124
  end
@@ -1,5 +1,5 @@
1
1
  module Rails
2
2
  module Instrumentation
3
- VERSION = '0.1.4'.freeze
3
+ VERSION = '0.1.5'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-instrumentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashwin Chandrasekar
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-07 00:00:00.000000000 Z
11
+ date: 2020-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentracing
@@ -136,7 +136,7 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '1.31'
139
- description:
139
+ description:
140
140
  email:
141
141
  - achandrasekar@signalfx.com
142
142
  executables: []
@@ -169,7 +169,7 @@ files:
169
169
  homepage: https://github.com/signalfx/ruby-rails-instrumentation
170
170
  licenses: []
171
171
  metadata: {}
172
- post_install_message:
172
+ post_install_message:
173
173
  rdoc_options: []
174
174
  require_paths:
175
175
  - lib
@@ -184,8 +184,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  - !ruby/object:Gem::Version
185
185
  version: '0'
186
186
  requirements: []
187
- rubygems_version: 3.0.6
188
- signing_key:
187
+ rubygems_version: 3.1.2
188
+ signing_key:
189
189
  specification_version: 4
190
190
  summary: OpenTracing instrumentation for Rails.
191
191
  test_files: []