zuora_observability 0.1.0.pre.f → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zuora_observability/logging/custom_options.rb +1 -0
- data/lib/zuora_observability/logging/formatter.rb +24 -12
- data/lib/zuora_observability/version.rb +1 -1
- metadata +5 -7
- data/app/assets/config/zuora_observability_manifest.js +0 -1
- data/app/assets/stylesheets/zuora_observability/application.css +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6d0f3a139bf8fb34c6d9eb5cda9f00e70454dca7eca5d5d805a1c5e3fd63db8
|
4
|
+
data.tar.gz: 0deaaad02637351504969a88c05156944aff6121f06af6ea092662591828911c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37bd27174e6e17457f24bdbecda6684de98a33a959403943ee02731cf763519b4cae6daa06ae1c58ca8f0ddb02924e1178c191a5170577f70e0112700a18cab9
|
7
|
+
data.tar.gz: 6c75b2300f11d99fc8f94e88cb618e6da59ee686c51fed7b78a1a8e0b12972a613422cba1ae21ed26d686279d9c7f0802fa52a6c53955172aca651cfe4794851
|
@@ -50,19 +50,28 @@ module ZuoraObservability
|
|
50
50
|
ecs: { version: ECS_VERSION },
|
51
51
|
log: { level: severity, logger: progname || @app_name },
|
52
52
|
service: { name: Env.name, version: Env.version },
|
53
|
-
trace: { id: data[:trace_id] }
|
53
|
+
trace: { id: data[:trace_id] },
|
54
|
+
tags: ['zecs']
|
54
55
|
}
|
55
56
|
end
|
56
57
|
|
57
|
-
#
|
58
|
+
# errors
|
58
59
|
def error_fields(data)
|
59
|
-
return {} unless data[:error]
|
60
|
+
return {} unless data[:error] || data[:err]
|
60
61
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
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
|
66
75
|
end
|
67
76
|
|
68
77
|
# http
|
@@ -81,7 +90,8 @@ module ZuoraObservability
|
|
81
90
|
# http.response
|
82
91
|
def response_fields(data)
|
83
92
|
{
|
84
|
-
status_code: data[:status]
|
93
|
+
status_code: data[:status],
|
94
|
+
body: data[:response_body]
|
85
95
|
}.compact
|
86
96
|
end
|
87
97
|
|
@@ -107,6 +117,7 @@ module ZuoraObservability
|
|
107
117
|
# user
|
108
118
|
def user_fields(data)
|
109
119
|
{
|
120
|
+
id: data[:user_id],
|
110
121
|
email: data[:email]
|
111
122
|
}.compact
|
112
123
|
end
|
@@ -124,7 +135,7 @@ module ZuoraObservability
|
|
124
135
|
|
125
136
|
# The Zuora Extension to ECS defined by ZECS
|
126
137
|
module ZuoraFields
|
127
|
-
ZECS_VERSION = '1.
|
138
|
+
ZECS_VERSION = '1.1'
|
128
139
|
|
129
140
|
class << self
|
130
141
|
# zuora top level field
|
@@ -144,7 +155,6 @@ module ZuoraObservability
|
|
144
155
|
|
145
156
|
def base_fields(data)
|
146
157
|
{
|
147
|
-
apartment_id: data[:app_instance_id],
|
148
158
|
cp_id: data[:zuora_track_id],
|
149
159
|
environment: data[:environment],
|
150
160
|
tenant_id: data[:tenant_ids],
|
@@ -163,7 +173,9 @@ module ZuoraObservability
|
|
163
173
|
|
164
174
|
# Service's Custom Fields
|
165
175
|
def service_fields(data)
|
166
|
-
|
176
|
+
{
|
177
|
+
app_instance_id: data[:app_instance_id]
|
178
|
+
}.merge(data.fetch(:zecs_service, {})).compact
|
167
179
|
end
|
168
180
|
end
|
169
181
|
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.
|
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-
|
11
|
+
date: 2021-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lograge
|
@@ -244,8 +244,6 @@ files:
|
|
244
244
|
- MIT-LICENSE
|
245
245
|
- README.md
|
246
246
|
- Rakefile
|
247
|
-
- app/assets/config/zuora_observability_manifest.js
|
248
|
-
- app/assets/stylesheets/zuora_observability/application.css
|
249
247
|
- app/controllers/zuora_observability/application_controller.rb
|
250
248
|
- app/controllers/zuora_observability/metrics_controller.rb
|
251
249
|
- app/helpers/zuora_observability/application_helper.rb
|
@@ -280,11 +278,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
280
278
|
version: '2.5'
|
281
279
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
282
280
|
requirements:
|
283
|
-
- - "
|
281
|
+
- - ">="
|
284
282
|
- !ruby/object:Gem::Version
|
285
|
-
version:
|
283
|
+
version: '0'
|
286
284
|
requirements: []
|
287
|
-
rubygems_version: 3.
|
285
|
+
rubygems_version: 3.2.15
|
288
286
|
signing_key:
|
289
287
|
specification_version: 4
|
290
288
|
summary: Summary of ZuoraObservability.
|
@@ -1 +0,0 @@
|
|
1
|
-
//= link_directory ../stylesheets/zuora_observability .css
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
-
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
-
* It is generally better to create a new file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|