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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d31b6073ad9e3656c57f437c94ddd5d261f42debb578a6eb480178f458ea571
4
- data.tar.gz: 919af15470a8e49809c140fa15b55bceccf3512d22f8d3470b72b94a9011649d
3
+ metadata.gz: f6d0f3a139bf8fb34c6d9eb5cda9f00e70454dca7eca5d5d805a1c5e3fd63db8
4
+ data.tar.gz: 0deaaad02637351504969a88c05156944aff6121f06af6ea092662591828911c
5
5
  SHA512:
6
- metadata.gz: 379c96696127af1384c9d52e322665fcdfcc94a05c645258281b6e823420a314b2bf93629df28f6042bfe869789acea4463c11ee1b8f603db9914b0a1113a80c
7
- data.tar.gz: c0c74096ef3088cce897ba8d912ac4ba4e8ddec29afb4821ad16bc2be6bc20f9984044413c045f5b26099ac3d7bff86310f46ba03ec183b9baf73ad71d5dda78
6
+ metadata.gz: 37bd27174e6e17457f24bdbecda6684de98a33a959403943ee02731cf763519b4cae6daa06ae1c58ca8f0ddb02924e1178c191a5170577f70e0112700a18cab9
7
+ data.tar.gz: 6c75b2300f11d99fc8f94e88cb618e6da59ee686c51fed7b78a1a8e0b12972a613422cba1ae21ed26d686279d9c7f0802fa52a6c53955172aca651cfe4794851
@@ -13,6 +13,7 @@ module ZuoraObservability
13
13
  CONTENT_TYPE
14
14
  ORIGINAL_FULLPATH
15
15
  QUERY_STRING
16
+ HTTP_COOKIE
16
17
  ].freeze
17
18
 
18
19
  IGNORE_PARAMS = %w[controller action format].freeze
@@ -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
- # error
58
+ # errors
58
59
  def error_fields(data)
59
- return {} unless data[:error]
60
+ return {} unless data[:error] || data[:err]
60
61
 
61
- {
62
- message: data[:error].message,
63
- stack_trace: data[:error].backtrace.join("\n"),
64
- type: data[:error].class
65
- }.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
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.0'
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
- data[:zecs_service].presence || {}
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZuoraObservability
4
- VERSION = '0.1.0-f'
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.1.0.pre.f
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-01-21 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
@@ -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: 1.3.1
283
+ version: '0'
286
284
  requirements: []
287
- rubygems_version: 3.1.4
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
- */