faraday-tracer 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/faraday-tracer.gemspec +1 -1
- data/lib/faraday/tracer.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60e2e4aa894625318f654fc7db470aa3148d8eba5cce402b1ae40d45043c6869
|
4
|
+
data.tar.gz: 9439a5e3e675651c4a3bfe704e8f0051ab8a6cc02514bb232225be3dd2b9ca51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c7a03dcb38ad3e7a8b8170a5e2a0fa165d75f5fc95d473e71505080e4533db868763e0c8f053f232dd6b10ed110a7946d38160ef53985254a56caa829806e1
|
7
|
+
data.tar.gz: 845173a57f9af7320ee0631eccc262d776f32050639ee77c55ce4bd1909cf9b90d1228c41a7aec667a88e0ec3a1bcc2003ef3d623584f997d874ed656a085388
|
data/faraday-tracer.gemspec
CHANGED
data/lib/faraday/tracer.rb
CHANGED
@@ -41,6 +41,11 @@ module Faraday
|
|
41
41
|
@tracer.inject(span.context, OpenTracing::FORMAT_RACK, env[:request_headers])
|
42
42
|
@app.call(env).on_complete do |response|
|
43
43
|
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
|
44
49
|
end
|
45
50
|
rescue *@errors => e
|
46
51
|
span.set_tag('error', true)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday-tracer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SaleMove TechMovers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentracing
|