zuora_observability 0.2.2 → 0.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 664115d7965e1d549ab2bb227565f51379a7ba3cc4ca0205d80523024918e0f4
|
4
|
+
data.tar.gz: 2ce847ad2f5ed52a267c2cbf2ea5496a1d700d78240b3680fc25f037c5fd0d8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd64817b0143ae8213875a024da8c3546d4b70fba916ca930860dab84a66522ae25733657f3a929a1d12161ce7d24dc7c305a4df98a13576c9d10e55f1116bef
|
7
|
+
data.tar.gz: ece638c0238dd314be5cdc3ed5a62317f44c3eb15f75bdf63a6443024cbd7a5f89619cf7d0ed7d7c282e7a9cdb4201259ac1c15e1eddd4d1cbc00c4cbb3f8e65
|
@@ -59,19 +59,13 @@ module ZuoraObservability
|
|
59
59
|
def error_fields(data)
|
60
60
|
return {} unless data[:error] || data[:err]
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
{
|
70
|
-
message: data.dig(:err, :message),
|
71
|
-
stack_trace: data.dig(:err, :stack),
|
72
|
-
type: data.dig(:err, :name)
|
73
|
-
}.compact
|
74
|
-
end
|
62
|
+
error = data[:err] || serialize_exc(data[:error])
|
63
|
+
|
64
|
+
{
|
65
|
+
message: error[:message],
|
66
|
+
stack_trace: error[:stack],
|
67
|
+
type: error[:name]
|
68
|
+
}.compact
|
75
69
|
end
|
76
70
|
|
77
71
|
# http
|
@@ -81,17 +75,21 @@ module ZuoraObservability
|
|
81
75
|
|
82
76
|
# http.request
|
83
77
|
def request_fields(data)
|
78
|
+
request = data.slice(:method, :params).merge(data.fetch(:request, {}))
|
79
|
+
|
84
80
|
{
|
85
|
-
method:
|
86
|
-
body: ({ content:
|
81
|
+
method: request[:method],
|
82
|
+
body: ({ content: request[:params] } if request.key? :params)
|
87
83
|
}.compact
|
88
84
|
end
|
89
85
|
|
90
86
|
# http.response
|
91
87
|
def response_fields(data)
|
88
|
+
response = data.slice(:status).merge(data.fetch(:response, {}))
|
89
|
+
|
92
90
|
{
|
93
|
-
status_code:
|
94
|
-
body:
|
91
|
+
status_code: response[:status],
|
92
|
+
body: ({ content: response[:params] } if response.key? :params),
|
95
93
|
}.compact
|
96
94
|
end
|
97
95
|
|
@@ -110,6 +108,7 @@ module ZuoraObservability
|
|
110
108
|
# url
|
111
109
|
def url_fields(data)
|
112
110
|
{
|
111
|
+
full: data.dig(:url, :full),
|
113
112
|
path: data[:path]
|
114
113
|
}.compact
|
115
114
|
end
|
@@ -164,10 +163,18 @@ module ZuoraObservability
|
|
164
163
|
|
165
164
|
# zuora.http
|
166
165
|
def http_fields(data)
|
167
|
-
z_http_request = {
|
166
|
+
z_http_request = {
|
167
|
+
headers: data[:headers],
|
168
|
+
headers_blob: data.dig(:request, :headers_blob)
|
169
|
+
}.compact
|
170
|
+
|
171
|
+
z_http_response = {
|
172
|
+
headers_blob: data.dig(:response, :headers_blob)
|
173
|
+
}.compact
|
168
174
|
|
169
175
|
{
|
170
|
-
request: (z_http_request unless z_http_request.empty?)
|
176
|
+
request: (z_http_request unless z_http_request.empty?),
|
177
|
+
response: (z_http_response unless z_http_response.empty?)
|
171
178
|
}.compact
|
172
179
|
end
|
173
180
|
|
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.
|
4
|
+
version: 0.3.0
|
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-
|
11
|
+
date: 2021-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lograge
|