signalfx-faraday-instrumentation 0.1.1 → 0.2.0

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: 8161f340d869b99a8156948c0bc9a1bfba06f98299f8365e05c0a31683e7f287
4
- data.tar.gz: fcba65788673b8ae34d23bed48675c4c998bb64bc93e9d9f37c0befcf4fa4644
3
+ metadata.gz: 388e11f7345271850925b669b7b7a1efbf56289526ab1ecd9ac603557cf1f425
4
+ data.tar.gz: fcff8687e83aeb8bfc8edadb44a17e518afacb8b678be6082ba1862b7c0f485c
5
5
  SHA512:
6
- metadata.gz: 40307be189c1ec13a6e33a185b8596222ea9dae5d4cd90df7a5726d66745b7c3991203ebe971cb4018297cf03d7c2cf01ef2ca8fd96a09834989bdf9f2cca744
7
- data.tar.gz: 2a4f5bad901d6532115db08fbf4a078162c09bd47484c4cf61af04d090d350d47dca7142c66c04e4768af10fbe737fe6f8d05346e5a00041b6f1e8ad121089fd
6
+ metadata.gz: a1c09b2b1d64e5492a359c74846b49d29e9c0f1d094db4b03184b453f2b7a3ccab3ae627e99168eae3530592bbab00f7e4d92657f48cac7b29c07dac6290c279
7
+ data.tar.gz: 122d2992dacdcba8ae967f8f9bb19c61dc3fc926370dcb3234f1a22f0a2b35df56d8e280e4b4041d2d33ee4d0725e6bac20b55fffda14a05ac373d657cf187c7
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
+ /*.gem
2
+ /vendor/
1
3
  /.bundle/
2
4
  /.yardoc
3
5
  /Gemfile.lock
@@ -1,10 +1,9 @@
1
-
2
1
  lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
 
5
4
  Gem::Specification.new do |spec|
6
5
  spec.name = 'signalfx-faraday-instrumentation'
7
- spec.version = '0.1.1'
6
+ spec.version = '0.2.0'
8
7
  spec.authors = ['SaleMove TechMovers']
9
8
  spec.email = ['techmovers@salemove.com']
10
9
 
@@ -20,12 +19,11 @@ Gem::Specification.new do |spec|
20
19
 
21
20
  spec.add_dependency 'opentracing'
22
21
 
23
- spec.add_development_dependency 'bundler', '~> 1.14'
22
+ spec.add_development_dependency 'bundler', '~> 2.1'
24
23
  spec.add_development_dependency 'faraday'
25
24
  spec.add_development_dependency 'rake', '~> 10.0'
26
25
  spec.add_development_dependency 'rspec', '~> 3.0'
27
26
  spec.add_development_dependency 'rubocop', '~> 0.54.0'
28
27
  spec.add_development_dependency 'rubocop-rspec', '~> 1.24.0'
29
- spec.add_development_dependency 'test-tracer', '~> 1.0'
30
- spec.add_development_dependency 'tracing-matchers', '~> 1.0'
28
+ spec.add_development_dependency 'signalfx_test_tracer', '~> 0.1.4'
31
29
  end
@@ -4,6 +4,9 @@ require 'faraday'
4
4
  require 'opentracing'
5
5
 
6
6
  module Faraday
7
+ class HTTPInstrumentationError < StandardError
8
+ end
9
+
7
10
  class Tracer < Faraday::Middleware
8
11
  # Create a new Faraday Tracer middleware.
9
12
  #
@@ -41,15 +44,10 @@ module Faraday
41
44
  @tracer.inject(span.context, OpenTracing::FORMAT_RACK, env[:request_headers])
42
45
  @app.call(env).on_complete do |response|
43
46
  span.set_tag('http.status_code', response.status)
44
-
45
- if response.status >= 500
46
- span.set_tag('error', true)
47
- span.log_kv(event: 'error', message: response.body.to_s)
48
- end
47
+ span.set_tag('error', true)
49
48
  end
50
49
  rescue *@errors => e
51
- span.set_tag('error', true)
52
- span.log_kv(event: 'error', :'error.object' => e)
50
+ span.record_exception(e)
53
51
  raise
54
52
  ensure
55
53
  span.finish if span
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Faraday
4
4
  module Tracer
5
- VERSION = '0.1.0'.freeze
5
+ VERSION = '0.2.0'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signalfx-faraday-instrumentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SaleMove TechMovers
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-24 00:00:00.000000000 Z
11
+ date: 2020-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentracing
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.14'
33
+ version: '2.1'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.14'
40
+ version: '2.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faraday
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -109,33 +109,19 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: 1.24.0
111
111
  - !ruby/object:Gem::Dependency
112
- name: test-tracer
112
+ name: signalfx_test_tracer
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '1.0'
117
+ version: 0.1.4
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '1.0'
125
- - !ruby/object:Gem::Dependency
126
- name: tracing-matchers
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '1.0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '1.0'
124
+ version: 0.1.4
139
125
  description: ''
140
126
  email:
141
127
  - techmovers@salemove.com
@@ -160,7 +146,7 @@ homepage: https://github.com/signalfx/ruby-faraday-tracer
160
146
  licenses:
161
147
  - MIT
162
148
  metadata: {}
163
- post_install_message:
149
+ post_install_message:
164
150
  rdoc_options: []
165
151
  require_paths:
166
152
  - lib
@@ -175,9 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
161
  - !ruby/object:Gem::Version
176
162
  version: '0'
177
163
  requirements: []
178
- rubyforge_project:
179
- rubygems_version: 2.7.3
180
- signing_key:
164
+ rubygems_version: 3.1.2
165
+ signing_key:
181
166
  specification_version: 4
182
167
  summary: Fork of Faraday::Tracer
183
168
  test_files: []