zuora_observability 0.2.1 → 0.2.2

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: c70da599b5f58c9c64c94febb1259133533e4040f39af07ec088d29f8ae2fa2d
4
- data.tar.gz: f77f964a6703ce134275d6d28b086544e1697a9254d6dae8f7929938e6212595
3
+ metadata.gz: f6d0f3a139bf8fb34c6d9eb5cda9f00e70454dca7eca5d5d805a1c5e3fd63db8
4
+ data.tar.gz: 0deaaad02637351504969a88c05156944aff6121f06af6ea092662591828911c
5
5
  SHA512:
6
- metadata.gz: 5b0091b662abd97dfc9dbcea538d536d89c20599625df07b3255f3497398ae5af2950c753ea6e2de04acd8d93970ab645f456657eadc8ba500237b8904a237c4
7
- data.tar.gz: f7145ed21ecb89bece952cda564d6a23019ef89616bb9b717712c97d11388396b930132cd65e018014531c0aa3187a9c3aaa7bcc6f2f8a10e63200a71fac4474
6
+ metadata.gz: 37bd27174e6e17457f24bdbecda6684de98a33a959403943ee02731cf763519b4cae6daa06ae1c58ca8f0ddb02924e1178c191a5170577f70e0112700a18cab9
7
+ data.tar.gz: 6c75b2300f11d99fc8f94e88cb618e6da59ee686c51fed7b78a1a8e0b12972a613422cba1ae21ed26d686279d9c7f0802fa52a6c53955172aca651cfe4794851
@@ -55,15 +55,23 @@ module ZuoraObservability
55
55
  }
56
56
  end
57
57
 
58
- # error
58
+ # errors
59
59
  def error_fields(data)
60
- return {} unless data[:error]
60
+ return {} unless data[:error] || data[:err]
61
61
 
62
- {
63
- message: data[:error].message,
64
- stack_trace: data[:error].backtrace.join("\n"),
65
- type: data[:error].class
66
- }.compact
62
+ if data[:error]
63
+ {
64
+ message: data[:error].message,
65
+ stack_trace: data[:error].backtrace.join("\n"),
66
+ type: data[:error].class
67
+ }.compact
68
+ else
69
+ {
70
+ message: data.dig(:err, :message),
71
+ stack_trace: data.dig(:err, :stack),
72
+ type: data.dig(:err, :name)
73
+ }.compact
74
+ end
67
75
  end
68
76
 
69
77
  # http
@@ -82,7 +90,8 @@ module ZuoraObservability
82
90
  # http.response
83
91
  def response_fields(data)
84
92
  {
85
- status_code: data[:status]
93
+ status_code: data[:status],
94
+ body: data[:response_body]
86
95
  }.compact
87
96
  end
88
97
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZuoraObservability
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_observability
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hartley McGuire
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-05 00:00:00.000000000 Z
11
+ date: 2021-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lograge
@@ -282,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
282
282
  - !ruby/object:Gem::Version
283
283
  version: '0'
284
284
  requirements: []
285
- rubygems_version: 3.2.3
285
+ rubygems_version: 3.2.15
286
286
  signing_key:
287
287
  specification_version: 4
288
288
  summary: Summary of ZuoraObservability.